Skip to content

Instantly share code, notes, and snippets.

@arturovt
Created June 6, 2019 23:21
Show Gist options
  • Save arturovt/ee5c5a83fe531bec0b7a7cd629471d40 to your computer and use it in GitHub Desktop.
Save arturovt/ee5c5a83fe531bec0b7a7cd629471d40 to your computer and use it in GitHub Desktop.
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-todos',
template: `
<app-todo *ngFor="let todo of todos" [todo]="todo"></app-todo>
`
})
export class TodosComponent {
public todos: Todo[] = this.route.snapshot.data.todos;
constructor(private route: ActivatedRoute) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment