Groups
Groups
Sign in
Groups
Groups
Angular and AngularJS discussion
Conversations
Labels
About
Send feedback
Help
load jquery script after router.navigate
28 views
Skip to first unread message
Vishnu Bidarakundi
unread,
Mar 6, 2018, 1:24:39 AM
3/6/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Angular and AngularJS discussion
I have jquery script. I want to load those scripts after the `router.navigate`.
I tried with this code author component
this.zone.run(() => this.router.navigate(['/author']))
In other book component in `ngOnit` I am loading those scripts
ngOnit(){ this.jquryscripts(); }
I have added my scripts here
jquryscripts(){ // jquey scripts }
I tried with zones and also by adding activated route in constructor not working!!
After adding those scripts inside the `index.html` like this
<script> jquery scripts </scripts>
If I use `window.location.reload()` then my `jquery` scripts are loading!!!
Vishnu Bidarakundi
unread,
Mar 6, 2018, 7:08:04 AM
3/6/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Angular and AngularJS discussion
After calling those scripts in ngAfterViewInit() working fine!!
Reply all
Reply to author
Forward
0 new messages