Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 9 Support #101

Closed
Liioooo opened this issue Jan 25, 2020 · 4 comments
Closed

Angular 9 Support #101

Liioooo opened this issue Jan 25, 2020 · 4 comments

Comments

@Liioooo
Copy link
Contributor

Liioooo commented Jan 25, 2020

Angular 9 will be released in the near future and I would like to continue using your package.
Would be nice if it was compatible with ng9.

@JustACodeMonkey
Copy link

JustACodeMonkey commented Feb 13, 2020

Agreed. Just updated an app to Angular 9 and get either ...

ERROR TypeError: Cannot read property 'nativeElement' of undefined
    at SlideshowComponent.push../node_modules/ng-simple-slideshow/__ivy_ngcc__/ng-simple-slideshow.es5.js.SlideshowComponent.setStyles

...or...

ERROR TypeError: Cannot read property 'nativeElement' of undefined
    at PointerService.push../node_modules/ng-simple-slideshow/__ivy_ngcc__/ng-simple-slideshow.es5.js.PointerService.bind

...Looks like code is being executed before the element has been instantiated by the renderer, so it can't get a reference to nativeElement.

[Last edit]
The simple fix I found was to move the code in SlideshowComponent from ngOnInit to ngAfterViewInit. At that point, the container ViewChild has a value, so the bind function in PointerService doesn't throw errors.

@Liioooo
Copy link
Contributor Author

Liioooo commented Feb 13, 2020

That's just what I did in my PR #102.

@Hermholtz
Copy link

Please merge PR #102.

dockleryxk added a commit that referenced this issue Mar 3, 2020
@dockleryxk
Copy link
Owner

Done, and available in beta.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants