I created this repository as a starting point for creating smart contracts on the Ethereum Blockchain using Angular JS and the Truffle Framework.
I previously created Angular MetaCoin which simply wrapped the code generated by the Truffle framework, from their command "truffle init" into an AngularJs application.
After using an Angular 1.5 Generator called Angular-eggs
I decided to implement the same structure they used, inside of the truffle framework. Angular Eggs uses Components rather than $scope and Controllers - and since Angular 2 is coming out, apparently developers are encouraged to start using Components wherever they can instead of directives, controllers, and $scope.
This app therefore modifies my original Angular MetaCoin app so that all the Transaction code and UI is now in a "transactions" component. The app configuration, and also th home page itself are also in separate components.
Hopefully, you will find this useful!
P.S. A very useful blog post regarding Angular 1.5 components can be found here Cheers
Paul @fire
-
[Etherium] ** Install on ubuntu *** sudo apt-get install software-properties-common *** sudo add-apt-repository -y ppa:ethereum/ethereum *** sudo apt-get update *** sudo apt-get install ethereum solc
-
Geth or testrpc ** Install and run testrpc with testnet *** sudo npm install -g ethereumjs-testrpc *** testrpc --testnet
-geth --rpc --testnet --rpcaddr localhost --rpcapi "eth,net,web3,admin" console
Before you are able to run the Angular app, you will need make sure that its dependencies have been properly installed to do that, you can use the bower package manager. All the dependencies are in bower.json in the main project folder
so simply run the following:
bower install
This will install all the angular dependencies in /bower_components This folder is ignored by git since the bower package manager takes care of the installation.
To run
truffle build
truffle serve
- Then go to: http://localhost:8080
Note: If you get a port error, you can run truffle on a different port
truffle --port 8081 serve
- Get angular-ui-router working
- add a navbar