preface
Angular is not very popular in China, and the cost of entry is much more difficult than vue and other technical frameworks, but Angular has many advantages, so if you choose Angular~, then follow me to learn!
The characteristics of
- cross-platform
- Code generation
- Integration testing
- The unified format facilitates maintenance
Configure the environment
Download from the official website
Then use NPM to download the CLi
Then create a small demo
Install the dependencies after they are created
yarnIt’s faster
Once you’ve installed your dependencies, you can try running them
Visit http://localhost:4200/ if you can see this page is ok ~
Common AngularCli directives
Current problems encountered
Changing styles in zorroAntd in CSS files doesn’t work (just add ::ng-deep to 🆗 before className)
There are also some problems with RXjs, such as how to stop polling if you leave the current page (interval). This problem can be judged by the routing address of the current page and set as observable, and finally subscribe withLatestFromding and filter with filter 🆗
filter(([, y]) => y),
In addition, we recommend a color matching site poisonous mushrooms