- Expert Angular
- Mathieu Nayrolles Rajesh Gunasundaram Sridhar Rao
- 214字
- 2021-07-15 17:05:37
Rules for incremental upgrade to Angular
It will be easier to do an incremental upgrade if we adhere to the following set of rules:
- Implement one component per file; it helps to isolate the components and migrate them one by one.
- Apply modular programming and arrange the folder by features; this will enable the developers to concentrate on migrating one feature at a time.
- Use a module loader; following the preceding rules, you will end up with a large number of files in a project. This creates the hassle of organizing the files and referring them in the correct order in the HTML pages. When you use a module loader such as SystemJS, Webpack, or Browserify, it enables us to use TypeScript built-in module systems. This enables the developers to import or export features explicitly and share them between various parts of the application in the code.
- Install TypeScript first; it is good to bring in the TypeScript compiler before starting the actual upgrade process. This can be achieved by a simple step of installing the TypeScript compiler.
- Use Component Directives; it is good practice to use Component Directives rather than ng-controller and ng-include in the AngularJS apps so that in Angular, migrating the Component Directives will be much easier than migrating the controllers.
推薦閱讀
- Git Version Control Cookbook
- What's New in TensorFlow 2.0
- Building a RESTful Web Service with Spring
- React Native Cookbook
- PHP+MySQL網站開發技術項目式教程(第2版)
- Bulma必知必會
- Python編程完全入門教程
- PHP+MySQL網站開發項目式教程
- 精通網絡視頻核心開發技術
- JavaScript動態網頁開發詳解
- Mobile Device Exploitation Cookbook
- Visual Basic程序設計全程指南
- Java多線程并發體系實戰(微課視頻版)
- TypeScript全棧開發
- 趣學數據結構