I have added some 3rd party Libraries.(Bootstrap,Jquery and boot-strap-select (http://silviomoreto.github.io/bootstrap-select/))
When I'm navigating pages "boot-strap-select" is not working. But when I refresh the page it works. But I'm wonder how bootstrap is working without refreshing.
I installed the library using npm and defined in angular-cli.json
"styles": [
"styles.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"../node_modules/bootstrap-select/dist/css/bootstrap-select.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js",
"../node_modules/bootstrap-select/dist/js/bootstrap-select.js"
]
I have tried to recreate script element in DOM but it refreshing the page (Links mentioned below).
Load scripts through all components in Angular 2
https://github.com/angular/angular-cli/issues/4619
I want to load third Party Library without refreshing the page when navigating.
Source code : RepoLink