Currently when updating to angular 4 we are getting the below warning:
npm WARN [email protected] requires a peer of @angular/common@^2.3.1 but none was installed.
npm WARN [email protected] requires a peer of @angular/compiler@^2.3.1 but none was installed.
npm WARN [email protected] requires a peer of @angular/core@^2.3.1 but none was installed.
npm WARN [email protected] requires a peer of @angular/forms@^2.3.1 but none was installed.
Hello, I'm going to open a PR for this!
It is already available in @beta version
I tried the beta, but it seems that it relies on angular RC, but stable is already out there.

Ignore this, it is just a peer dependencies
Could simply relax peer dep to >=4.0.0
alos, don't forget to replace <template> tags by <ng-template>.
I don't want to drop backwards compatibility :(
Well, I think you should cut a version where you stop worry about Angular2 and focus on Angular4. @valorkin
@valorkin 4.0.0 is out - could you update @beta version to use the stable ng 4 release?
The peer dependency breaks compatibility with npm shrinkwrap for those on ng 4.0.0.
Yep, I will cut down 2 versions tomorrow
With new dropdown and ng v4
Can we use ">2.0.0" instead of "^4.0.0" to avoid this issue in future angular versions?
What about: "^2.0.0" || ">4.0.0"
So 2 and 4 both are supported, may be deprecated but for now it still works.
Adding to @FabienDehopre using ng-template would be nice. The only warning I receive atm is from ng2-bootstrap:
The <template> element is deprecated. Use <ng-template> instead ("
[WARNING ->]<template [ngIf]="!isClosed">
<div [class]="'alert alert-' + type" role="alert" [ngClass]="classes""): ng:///projx/node_modules/ng2-bootstrap/alert/alert.component.d.ts.AlertComponent.html@1:0
Thanks :)
@eestein this is already done in ^2.0.0-rc.0 :)
Do not see tag 2.0.0-rc.0 - latest i see is 1.4.2
@Ketec npm install [email protected] ;)
@Martin-Wegner thanks :) I'll try that
@Martin-Wegner Where is the branch of 2.0.0? :thinking:
@valorkin Also, do you plan to change the name of package?
@GuskiS I don't know which branch @valorkin used :/
And renaming is discussed here: https://github.com/valor-software/ng2-bootstrap/issues/1280
ngx-bootstrap will be the new name
v1.6 with relaxed peer dependencies published
Just tried v1.6 and I can confirm it fixes npm shrinkwrap
but it doesn't use \
@St1c this is because @valorkin did not want to break Angular 2 support.
Guilty, things: renaming templates is only 15% of migration for me, internal stuff changed too. So I will have update services too
why not support Angular 4 properly (with <ng-template>) and do a major release? @valorkin
Check @next version in npm
@next version is only available for ng2-bootstrap, not ngx-bootstrap. Would it be possible to publish @next for ngx-bootstrap?
$ npm view ngx-bootstrap dist-tags
{ latest: '1.6.2' }
$ npm view ng2-bootstrap dist-tags
{ latest: '1.6.2', next: '2.0.0-beta.0' }
edit as of April 17th
Looks good!
$ npm view ngx-bootstrap dist-tags
{ latest: '1.6.6', next: '2.0.0-beta.2' }
@valorkin Hello ! Can you tell me the branch to use if I want to look at the code or contribute to @next version ?
+1, @valorkin , can you please share with us where can we find code related to @next version?
+1 @valorkin, yes please share the source to the @next version.
I get the Cannot call a namespace ('moment') error with @next version with Angular4 when running AOT compiling and rollup.
Adding "allowSyntheticDefaultImports": true as mentioned in #1556 my tsconfig.json had no effect. Maybe I am doing something wrong there.
I actually use moment in my application directly and solved this issue by using moment-es6 Referenced here. I assume doing something similar in the @next version might solve this issue.
Most helpful comment
alos, don't forget to replace
<template>tags by<ng-template>.