Skip to content

Instantly share code, notes, and snippets.

@vsavkin
Created October 9, 2018 16:25
Show Gist options
  • Save vsavkin/241a1847287dcea71cab09947cb4f839 to your computer and use it in GitHub Desktop.
Save vsavkin/241a1847287dcea71cab09947cb4f839 to your computer and use it in GitHub Desktop.
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');
}
}
@Dashiing
Copy link

Dashiing commented Nov 26, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment