owsolutions / amazing-time-picker

Timepicker (Clock Picker) for Angular 2, Angular 4 and Angular 5, Angular 6, Angular 7 - Compatible with Angular Material
137 stars 76 forks source link

Does not work with Angular 7.2 #132

Open m0j0nz0r opened 5 years ago

m0j0nz0r commented 5 years ago

specs: Win 10 Pro 64bit version 1903 build 18362.295 Chrome 76.0.3809.132 (official build) (64 bits)

To recreate: 1) create a new angular project with angular cli. 2) add amazing-date-picker to this new project. 3) follow the instructions in the readme and use the component.

ng serve --aot fails with: ERROR in : Unexpected value 'AmazingTimePickerModule in {projectPath}/node_modules/amazing-time-picker/amazing-time-picker.d.ts' imported by the module 'AppModule in {projectPath}/src/app/app.module.ts'. Please add a @NgModule annotation.

ng serve will succeed with warnings:

WARNING in ./node_modules/amazing-time-picker/node_modules/@angular/core/fesm5/core.js 27315:15-36
Critical dependency: the request of a dependency is an expression

WARNING in ./node_modules/amazing-time-picker/node_modules/@angular/core/fesm5/core.js 27327:15-102
Critical dependency: the request of a dependency is an expression

going to localhost:4200 (default settings for ng serve) produces this error:

ERROR Error: StaticInjectorError(AppModule)[AtpDirective -> ViewContainerRef]: 
  StaticInjectorError(Platform: core)[AtpDirective -> ViewContainerRef]: 
    NullInjectorError: No provider for ViewContainerRef!
    at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:8896)
    at resolveToken (core.js:9141)
    at tryResolveToken (core.js:9085)
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8982)
    at resolveToken (core.js:9141)
    at tryResolveToken (core.js:9085)
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8982)
    at resolveNgModuleDep (core.js:21218)
    at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21907)
    at resolveDep (core.js:22278)
mrjack88 commented 4 years ago

@m0j0nz0r did you ever find a way to overcome the issue?

m0j0nz0r commented 4 years ago

@m0j0nz0r did you ever find a way to overcome the issue?

Only partially, Yarn seems to only download latest regardless of what version you tell it to install.

Using npm instead seems to get around the issue, but this is a sub optimal solution.