Created
October 9, 2018 16:29
-
-
Save vsavkin/0f2845c6f40d6bc236353ae720c601c3 to your computer and use it in GitHub Desktop.
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 { Component } from '@angular/core'; | |
import {Observable} from "rxjs"; | |
import {HttpClient} from "@angular/common/http"; | |
import {Ticket} from "@myorg/data"; | |
@Component({ | |
selector: 'myorg-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent { | |
tickets: Observable<Ticket[]>; | |
constructor(http: HttpClient) { | |
this.tickets = http.get<Ticket[]>('/api/tickets'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment