title: Jquery select in dart and angularjs 2
body: <p>I am working with Dart and Angularjs 2, I want to use select2 the view but it is not working, my code is:</p>
  
  <p>code in html</p>
  
  <pre><code>&lt;div class="form-group"&gt;
   &lt;label for="nivelEducativo" class="col-sm-2 control-label"&gt;Nivel Educativo&lt;/label&gt;
   &lt;div class="col-sm-4"&gt;
   &lt;select class="select_profession form-control" id="nivelEducativo" 
  *ngIf="paramsByTypeCode != null" [(ngModel)]="model.situacionEducativaId"&gt;
       &lt;option *ngFor="#param of paramsByTypeCode['PRT014']" 
      value="{{param.id}}"&gt;{{param.nombre}}&lt;/option&gt;
   &lt;/select&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  ...
  &lt;script&gt;
    function __selectProfession(selector) {
      $(selector).select2({
      placeholder: "Select One",
      allowClear: true
    });
   }
  &lt;/script&gt;
  </code></pre>
  
  <p>code in Dart</p>
  
  <pre><code>  void ngAfterViewInit(){
      new Timer(new Duration(seconds: 1),()=&gt;js.context.callMethod('__selectProfession',[".select_profession"]));
    }
  </code></pre>
  
  <p>The select2 doesn't work, but if I remove ngIf tag the select2 works but it doesn't show the list of professions, the select2 works well without angular2. I want to know,so how can I work with it?.</p>
  
  <p>Thanks for all.</p>