title: Angular Js Ng-Route Run Script After Load
body: <p>i have an issue about Angular JS Ng-Route. I can route, but when the template comes. I should run a script but i cannot do that.</p>
  
  <p>Ex. I want to add selectpicker (bootstrap), i can search in it. But when i route that template i can get the selectpicker but it will not work, there is no search-bar in it. </p>
  
  <p>App.js</p>
  
  <pre><code>var myApp = angular.module("myApp", ["ngRoute"]); 
  
  myApp.config(function($routeProvider) {
  $routeProvider
      .when("/test", {
          templateUrl: "partial/test.html"
      })
      .otherwise({
          redirectTo: "404.html"
      });
  });
  </code></pre>
  
  <p>Partial/test.html</p>
  
  <pre><code>&lt;div class="form-group"&gt;
       &lt;label class="col-sm-4 control-label form-label"&gt;With Search input&lt;/label&gt;
       &lt;div class="col-sm-8"&gt;
            &lt;select class="selectpicker" data-live-search="true"&gt;
                 &lt;option&gt;Hot Dog, Fries and a Soda&lt;/option&gt;
                 &lt;option&gt;Burger, Shake and a Smile&lt;/option&gt;
                 &lt;option&gt;Sugar, Spice and all things nice&lt;/option&gt;
            &lt;/select&gt;
       &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>