官术网_书友最值得收藏!

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.
主站蜘蛛池模板: 上虞市| 红桥区| 台中县| 鄯善县| 上高县| 江达县| 买车| 丰宁| 江阴市| 宝兴县| 固安县| 苏尼特左旗| 宜宾县| 大新县| 若尔盖县| 鄂尔多斯市| 确山县| 舞钢市| 腾冲县| 惠来县| 临朐县| 砀山县| 赤城县| 西乌珠穆沁旗| 玉山县| 建德市| 交口县| 曲靖市| 阜宁县| 洪洞县| 青海省| 县级市| 浠水县| 梅河口市| 布尔津县| 广元市| 松阳县| 贡嘎县| 于都县| 晴隆县| 固镇县|