-
Notifications
You must be signed in to change notification settings - Fork 5
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
Cannot read property 'pageCountChange' of undefined #1
Comments
Does your template have a I should add an extra check, instead of just assuming it exists. I do in some other places but apparently missed ngOnInit. Will fix. |
Yes i have this in my template *kbPages="let page of pages" still it is not working. Only difference in our case is that we are not bootstraping this component in same component. |
Yeah, that is the normal use case (See /examples/hero/app.ts). Are you importing both |
yes, i am importing KBPagesRendererDirective and KBPageSliderComponent in my component as directives. and have also followed your example ( /examples/hero/app.ts). But Still getting the error Cannot read property 'pageCountChange' of undefined |
Hmm, that is very odd. Is there anything you've done differently from the example that I could test to see if I can reproduce the error? |
// Get the page renderer loop and keep its size up to date
@ContentChild(KBPagesRendererDirective) renderer : KBPagesRendererDirective;
ngOnInit(){
this.renderer.pageCountChange.subscribe((count)=>{
this.pageCountChange.emit(count);
});
It is giving error Cannot read property 'pageCountChange' of undefined which seems renderer is not getting defined, what exactly is not working in my case. Which is defined in this @ContentChild(KBPagesRendererDirective) renderer : KBPagesRendererDirective;
Angular Version - 2.0.0-rc.1
The text was updated successfully, but these errors were encountered: