Closed tjvg91 closed 5 years ago
It's really your code ? Where is the start is the lifecycle of your component ?
Well I did import the module in app.module.ts
...
import { WalkthroughModule } from 'angular-walkthrough';
...
@NgModule({
...
imports: [
BrowserModule,
CommonModule,
HttpModule,
BrowserAnimationsModule,
WalkthroughModule,
IonicModule.forRoot(MyApp),
],
...
});
export class AppModule{}
That's it.
“lifecycle of your component” : ngOnInit
, ngAfterContentInit
, ngAfterViewInit
I put my code inside ionViewDidLoad
...
import { Component, OnDestroy, ViewChild, ElementRef, HostListener } from '@angular/core';
import { WalkthroughFlowComponent } from 'angular-walkthrough'
...
@IonicPage()
@Component({
...
})
export class ReaderPage implements OnDestroy{
...
@ViewChild('walkFlow1') walkFlow1: WalkthroughFlowComponent;
...
constructor(...){...}
ionViewDidLoad(){
...
this.walkFlow1.start();
}
ngDestroy(){...}
No ngOnInit
, ngAfterContentInit
, or ngAfterViewInit
Hoo, it's with Ionic... Sorry, it don't use it.
For information, the module injects an external component in the body. Without body, this module doesn't work.
If this different in an Ionic application, thank to explain what it looks like.
Does the lifecycle matter that much? When do the walkthrough elements appear? And yes I have that walkthrough-container
element.
I have add a fix. Please, test with 0.7.3.
Why do I get this error?
This is my code:
This is my markup: