Tutorial see: https://teropa.info/blog/2016/12/12/graphics-in-angular-2.html
In this tutorial it is shown how you can incorporate 2D Canvas graphics into Angular applications, and how you can avoid potential problems along the way. It will also show how to add motion to Canvas graphics by animating them.
- Node.js
- Angular CLI
- Visual Code
In this project branches are used to reflect the step by step progress. Start with branch master and go ahead to step1, step2, ... .
Use command git checkout <branch>
to get one of the following branches:
-
- New ng project after
ng init ngx-canvas
- New ng project after
-
- Tutorial: Making An Angular Canvas Component
-
- Tutorial: Drawing On The Canvas from Lifecycle Hooks
-
Important hint:
npm module boids is needed, so don't forget to callnpm install
!
This module does not support typescript types. These types are defined in file src/typings.d.ts.- Tutorial: Animating Canvas Graphics
- What is Boids?
-
- Tutorial: Avoiding Excessive Change Detection By Escaping The Angular Zone