美文网首页
[持续更新] - 从Angular7升级至Angular8,记录

[持续更新] - 从Angular7升级至Angular8,记录

作者: YUUZone | 来源:发表于2019-09-26 11:16 被阅读0次

下面记录了在升级Angular8中遇到需要增加或变更的部分。
本人Angular开发学习笔记,持续更新。

1.@ViewChild()

  • Angular7写法
@ViewChild('test') test;
  • Angular8写法
@ViewChild('test', {static: false}) test;

参考链接:Angular中文官网API - ViewChild

2.路由懒加载

  • Angular7写法
loadChildren: 'app/routes/index/index.module#IndexModule';
  • Angular8写法
loadChildren: () => import('app/routes/index/index.module').then(mod => mod.IndexModule)

在配置Angular8新的路由懒加载方法时,需要在tsconfig.json文件中修改编译模式为"module": "esNext",才能够启动成功。
参考链接:Angular中文官网介绍 - 惰性加载路由配置

相关文章

  • [持续更新] - 从Angular7升级至Angular8,记录

    下面记录了在升级Angular8中遇到需要增加或变更的部分。本人Angular开发学习笔记,持续更新。 1.@Vi...

  • 微前端乾坤+Angular9

    前言 之前写过一篇关于微前端乾坤+Angular8的笔记,现在NG9已经到来,因此做了一次升级,仅以此文记录。 安...

  • 记录(持续更新)

    1.不去观世界,何来世界观。有的人说,想去泰国,但是不喜欢吃泰国菜,那里有中餐和西餐么?当然有,但是你确定要去么?...

  • Angular7 踩坑记录

    Angular7 踩坑记录 1. Ineffective mark-compacts near heap limi...

  • Harbor版本升级

    近期harbor漏洞频发,需要频繁升级,官方升级指北令人迷失,这里简略记录下升级过程。 备份 准备更新 更新 回滚...

  • Leetcode 88. Merge Sorted Array

    Python 3 实现: 源代码已上传 Github,持续更新。 源代码已上传至 Github,持续更新中。

  • Leetcode 21. Merge Two Sorted Li

    Python 3 实现: 源代码已上传 Github,持续更新。 源代码已上传至 Github,持续更新中。

  • Leetcode 9. Palindrome Number

    Python 3 实现: 源代码已上传 Github,持续更新。 源代码已上传至 Github,持续更新中。

  • Leetcode 4. Median of Two Sorted

    Python 3 实现: 源代码已上传 Github,持续更新。 源代码已上传至 Github,持续更新中。

  • 2021-05-12

    关于ReactNative版本升级问题(持续更新) 从0.59.10版本到现在的0.63.4版本遇到的问题: 1....

网友评论

      本文标题:[持续更新] - 从Angular7升级至Angular8,记录

      本文链接:https://www.haomeiwen.com/subject/ssalyctx.html