Ngx-bootstrap: Angular 4 How could I remove the warning "The <template> element is deprecated. Use <ng-template>

Created on 11 Oct 2017  路  29Comments  路  Source: valor-software/ngx-bootstrap

I have run:
npm install ngx-bootstrap@next

but it was NOT helpful, the warning message is keeping showing

capture2

capture

Most helpful comment

Note: In about a week Angular 5 is to be released, and this warning becomes an error.

The <template> element is deprecated. Use <ng-template> instead ("
[WARNING ->]<template [ngIf]="!isClosed">
  <div [class]="'alert alert-' + type" role="alert" [ngClass]="classes""): ng:///AlertModule/AlertComponent.html@1:0

This is literally a three character replacement. Please add it to v1.9.4 so we can all move on.

All 29 comments

did you delete package lock? Clear npm cache and node_modules? If I run npm install on new angular app I do not see the message

  1. git clean 鈥揹fx
  2. npm install
  3. npm install ngx-bootstrap@next
  4. npm start

After running the above, NOT helpful, the warning is still displaying

you have [email protected] and ngx-bootstrap@next together

git clean 鈥揹fx
npm install
npm install [email protected] ngx-bootstrap@next
npm start

NOT helpful

you need version 1.1.16 or next, not both !!!

sorry, I do not understand.
Can you show me the detail steps, so I could have a better understanding ?

capture

git clean 鈥揹fx
npm remove ng2-bootstrap --save
npm remove ngx-bootstrap --save
npm install ngx-bootstrap@next --save

just installing a new version is not enough. If you were using ng2-bootstrap then after installing a new version you should replace all references to ng2-bootstrap to ngx-bootstrap. 1.1.16 is a very old version and a lot of things have changed since it was released so you'll encounter some errors during the update, in this case just follow our demo.

This is not an issue with version ^2.0.0-beta.6

sorry, nothing of the above is working

I just installed today the version 1.9.3. I run: ng serve --aot
The