Giter Site home page Giter Site logo

dapps-truffle-angular's Introduction

Angular 1.5 Truffle Meta Coin With Components

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

Dependencies

  • [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

  • Node.js & npm

  • Truffle

  • Geth or testrpc ** Install and run testrpc with testnet *** sudo npm install -g ethereumjs-testrpc *** testrpc --testnet

    Run geth with testnet and rpc

      -geth --rpc --testnet --rpcaddr localhost --rpcapi "eth,net,web3,admin" console
    
  • Bower

Build

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.

Run

To run

Note: If you get a port error, you can run truffle on a different port

  • truffle --port 8081 serve

Preview

Todo

  • Get angular-ui-router working
  • add a navbar

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.