This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | constructor(private _http: CoolHttp) { } | |
| async ngOnInit() { | |
| // await async api call | |
| const response = await this._http.getAsync('/api/request'); | |
| console.log(response); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | @Component({ | |
| selector: 'my-app', | |
| template: ` | |
| <div *ngIf="showLoadingIndicator" class="my-loading-indicator"> | |
| </div> | |
| ` | |
| }) | |
| export class MyAppComponent { | |
| constructor(private http: Http) { | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <cool-loading-indicator [indicatorDelay]="500"> | |
| <div>This is you incredible custom loading indicator element</div> | |
| </cool-loading-indicator> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { CoolHttp } from 'angular2-cool-http'; | |
| @Component({ | |
| selector: 'my-app', | |
| template: ` | |
| <div> | |
| {{ data }} | |
| </div> | |
| ` | |
| }) |