Ng2-datepicker + is not supported in angular 4

I am trying to upgrade from angular from 2.4.0 to angular 4. When I tried this, I found the following peer dependency errors:

Tried installing the latest datepicker:

npm install ng2-datepicker โ€“save

Received the following error:

npm WARN ng2-datepicker@1.8.3 requires a peer of @angular/forms@^2.4.0 but none 
was installed.

Tried installing the last clue:

npm install ngx-tooltip โ€“save

Received the following error:

npm WARN ngx-tooltip@0.0.9 requires a peer of @angular/core@^2.0.0 but none was installed.

How to use ng2-datepicker / ngx-tooltip with angular 4? Or there is another module for datepicker and tooltip that can work for angular 4.

+4
source share
1 answer

check package.jsonand make sure you have this:

"@angular/core": "^4.0.1",
"@angular/forms": "^4.0.1",

This means that the transition to version 4 (at least to these modules) was successful.

And for datepicker use ng2-datetime. It works like a charm.

:

npm install --save ng2-datetime
+2

Source: https://habr.com/ru/post/1676471/


All Articles