Coder Social home page Coder Social logo

jafman / angulartruffledapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onlyonejmjq/angulartruffledapp

0.0 0.0 0.0 4.62 MB

Angular + Truffle = Beautiful Material Dapp

Home Page: https://truffleframework.com/boxes/angulartruffledapp

License: MIT License

TypeScript 76.37% JavaScript 6.32% HTML 11.85% Solidity 3.31% SCSS 2.16%

angulartruffledapp's Introduction

Logo

Angular + Truffle = 💓 ÐAPPS

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

Development server

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.

Code scaffolding

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.

Build

  1. Install truffle, Angular CLI and an Ethereum client. If you don't have a test environment
npm install -g truffle
npm install -g @angular/cli
npm install -g ganache-cli
  1. Download the box.
truffle unbox ng-es/angulartruffledapp
  1. Run your Ethereum client. For Ganache CLI:
ganache-cli

Note the mnemonic 12-word phrase printed on startup, you will need it later.

  1. Install the dependencies and Compile and migrate your contracts, into the directory Blockchain using :
npm install 
  1. Change the port in truffle-config.js
change the port in truffle-config.js 8545 in windows the port is 7545 but in linux the defaul port is  8545
  1. Navigate into the Frontend Directory
npm install & ng serve , And lets Buidl 
  1. If you want to customize <===
  • 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

Common errors and their solutions

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

Code contributions welcome!

  1. Fork it
  2. Add new features
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
  1. Create a pull request

angulartruffledapp's People

Contributors

abnergarcia96 avatar antoniocardenas avatar christianroig avatar magded avatar onlyonejmjq avatar turupawn avatar

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.