J'ai un problème à propos de Angular JS Ng-Route. Je peux router, mais quand le modèle vient. Je devrais lancer un script mais je ne peux pas faire ça.Angulaire Js Ng-Route Exécuter le script après chargement
Ex. Je veux ajouter selectpicker (bootstrap), je peux y chercher. Mais quand je route ce modèle je peux obtenir le selectpicker mais cela ne fonctionnera pas, il n'y a aucune barre de recherche dedans.
app.js
var myApp = angular.module("myApp", ["ngRoute"]);
myApp.config(function($routeProvider) {
$routeProvider
.when("/test", {
templateUrl: "partial/test.html"
})
.otherwise({
redirectTo: "404.html"
});
});
partielle/test.html
<div class="form-group">
<label class="col-sm-4 control-label form-label">With Search input</label>
<div class="col-sm-8">
<select class="selectpicker" data-live-search="true">
<option>Hot Dog, Fries and a Soda</option>
<option>Burger, Shake and a Smile</option>
<option>Sugar, Spice and all things nice</option>
</select>
</div>
</div>