Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
459 views
in Technique[技术] by (71.8m points)

angular - One component ngOnInit hook is called from other component route

I have one root module with two feature module. And i will load the first feature module with route /one. And in that /one routes components ngOnInit() lifecycle hook i am opening one modal. And that will be closed before filling the form.

And then i route to /two routes component, but in this component ngOnInit() hook i don't have any modal to open, but still the same modal which i opened in /one is getting opened.

Any idea why /one ngOnInit() hook is invoked while routing to /two ngOnInit() hook?

Thanks in Advance.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...