Created
October 9, 2018 16:25
-
-
Save vsavkin/241a1847287dcea71cab09947cb4f839 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
interface Ticket { | |
id: number; | |
title: string; | |
} | |
@Component({ | |
selector: 'myorg-root', | |
template: ` | |
<myorg-shell title="Tuskdesk App"></myorg-shell> | |
<ul> | |
<li *ngFor="let t of tickets|async"> | |
{{ t.title }} | |
</li> | |
</ul> | |
` | |
}) | |
export class AppComponent { | |
tickets: Observable<Ticket[]>; | |
constructor(http: HttpModule) { | |
this.tickets = http.get('/api/tickets'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Victor,
I think you meant HttpClient on line 20.
I'm currently following your post on "Building Full-Stack Applications Using Angular CLI and Nx".
Thank you for this.