Welcome to the Easy Angular16 Motoko Github repo!
This repository is made to be a plug-and-play solution for using Angular16 as an ICP smart contract canister front-end with Motoko as the canister back-end.
This project uses Angular version 16.1.3 and DFX version 0.14.2.
run git clone 'https://github.com/JupiterM/Angular16Motoko'.
cd Angular16Motoko.
run 'npm install -y'.
run 'npm run deploy:local'.
ZoneAware promise returns value in console. Only there to demostrate connectivity. Will be changed later.
Just change values in 'canister_ids.json' to your own.
run 'npm run deploy:ic'
Angular is meant to be run as a front-end canister, so 'ng serve' is not preferred.
Use 'npm run deploy:local' instead.
Components and services can be created the same.
When creating a new component or service:
{ MotokoService } must be imported and instantiated prior to being used.
After updating Motoko smart contract 'main.mo'
run "npm run generate:motoko" to generate new candid files
The motoko services file 'motoko.service.ts' must also be updated.
Instead of using ng build
to build the project,
use either:
'npm run build:dev' for a development build or
'npm run build:prod' for a production build
No additional testing has been created yet. There is only a ZoneAwarePromise which returns the value from a 'greet' function in the console to verify connectivity.
Check out the Dfinity forums for further help...if you dare!!