title: Isotope with angular 2
body: <p>How can i use isotope jquety lib with angular2 and observables. When I get data from server i want to apply isotope. For now I have:</p>
  
  <pre><code>import {Component} from "angular2/core";
  import {Heroes} from "./heroes";
  import {ApiclientService} from "./apiclient.service";
  
  @Component({
      templateUrl: 'heroes-list.html',
      providers: [ApiclientService]
  })
  
  export class HeroesComponent {
  
      public Heroes: Heroes[] = [];
  
      constructor(private _apiclientService: ApiclientService) {
          this.getHeroes();
      }
  
      getHeroes() {
          this._apiclientService.getHeroes()
                   .subscribe(
                      heroes =&gt; this.heroes = heroes,
                      error =&gt; this.errorMessage = &lt;any&gt;error);
  
  
      }
  
      ngAfterViewInit() {
          $(document).ready(function() {
              $('.heroes-grid').isotope({
                  itemSelector: '.heroes-item'
              });
          });
      }
  }
  </code></pre>
  
  <p>This doesnt work because jquery is resolved before observable subscribe method is returning some data. If i call isotope after observable is resolved, also with no success. What is the best way to approach to this kind of situations. How to combine jquery plugins and observables?</p>