This Truffle Box provides a base for working with the Truffle Framework and Angular. It provides a basic working example of the MetaCoin contracts with Angular components. This project is generated with Angular CLI.
- Install truffle, Angular CLI and an Ethereum client. If you don't have a test environment, we recommend Ethereum TestRPC
npm install -g truffle
npm install -g @angular/cli
npm install -g ethereumjs-testrpc
- Download the box.
truffle unbox Quintor/angular-truffle-box
- Run your Ethereum client. For TestRPC:
testrpc
Note the mnemonic 12-word phrase printed on startup, you will need it later.
- Compile and migrate your contracts.
truffle compile && truffle migrate
- Run the app using Angular CLI:
ng serve
The app is now served on localhost:4200
-
Connect to it by opening it in your browser and configuring MetaMask with the 12-word phrase from TestRPC.
-
Send MetaCoins!
- Running the Angular component tests:
ng test
- Running the Truffle tests:
truffle test
- Running Protactor end-to-end tests
ng e2e
Using the Angular CLI you can build a distributable of your app. Will be placed in dist/
ng build
- Where can I find more documentation?
This Truffle box is a union of Truffle and a React setup created with Angular CLI. For solidity compilation and Ethereum related issues, try the Truffle documentation. For Angular CLI and typescript issues, refer to the Angular CLI documentation