Angular + Truffle = Beautiful Material Dapp
This Trufflebox provides a base for Truffle Framework and Angular DAPP. and you can make transactions between accounts and scale you app with beautiful material design
This was generated with Angular CLI version 11.2.1
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
npm install -g truffle
npm install -g @angular/cli
npm install -g ganache-cli
truffle unbox ng-es/angulartruffledapp
ganache-cli
Note the mnemonic 12-word phrase printed on startup, you will need it later.
npm install
change the port in truffle-config.js 8545 in windows the port is 7545 but in linux the defaul port is 8545
npm install & ng serve , And lets Buidl
First Change the contract in Blockchain/contracts or make your own contract and compile and migrate
Second Change the app/service/contract.service.ts with your builded contract .json and you custom directives and functions
Error | Solution |
---|---|
Module not found: Error: Can't resolve '../../../../../Blockchain/build/contracts/Payment.json' during ng serve |
Run truffle compile |
Error: the tx doesn't have the correct nonce. in MetaMask |
Reset MetaMask: Settings -> Reset Account //Warning only with test accounts |
Error getting balance; see log. in UI, with Error: MetaCoin has not been deployed to detected network (network/artifact mismatch) in browser console |
Ensure you have started ganache, run truffle migrate and configured MetaMask to point to ganache |
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature