If 'ng-template' is a Web Component then add “CUSTOM_ELEMENTS_SCHEMA” to the of this component to suppress this message. (\"[ERROR ->]<ng-template>

丶灬走出姿态 提交于 2019-12-05 18:58:11
  1. Update angular-cli: https://github.com/angular/angular-cli/wiki/stories-1.0-update
  2. Update typescript and optionally your @angular packages. Your packages are pretty behind, most importantly angular-cli, so be prepared.
    • My core packages:

dependecies: {
  "@angular/animations": "^4.0.2",
  "@angular/common": "^2.3.1",
  "@angular/compiler": "^2.3.1",
  "@angular/compiler-cli": "^2.4.10",
  "@angular/core": "^2.3.1",
  "@angular/forms": "^2.3.1",
  "@angular/http": "^2.3.1",
  "@angular/material": "^2.0.0-beta.3",
  "@angular/platform-browser": "^2.3.1",
  "@angular/platform-browser-dynamic": "^2.3.1",
  "@angular/platform-server": "^4.0.0",
  "@angular/router": "^3.3.1"
}
devDependencies: {
  "@angular/cli": "^1.0.0",
  "typescript": "^2.2.2"
}
  1. npm install @angular/material && npm install hammerjs —-save
    • add /node_modules/hammerjs/hammer.js in angular-cli.json
  2. MaterialModuleis deprecated https://github.com/angular/material2/releases
    • import individual modules into your app.module, and export accordingly then simply add tags to html

<ng-template> was introduced in Angular4.

User either <template> or <ng-container>

See also

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!