Skip to content

Commit

Permalink
Step 9.1: Get the ID of the list from the router
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and Dotan Simha committed Nov 22, 2016
1 parent 62b87b5 commit 9ad6c41
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions client/imports/components/list-show.component.ts
@@ -1,8 +1,17 @@
import {Component} from "@angular/core";
import {Component, OnInit} from "@angular/core";
import {ActivatedRoute, Params} from "@angular/router";

@Component({
template: 'Hello ListShow!'
})
export class ListShowComponent {
export class ListShowComponent implements OnInit {
constructor(private currentRoute: ActivatedRoute) {

}

ngOnInit() {
this.currentRoute.params.subscribe((params: Params) => {
const listId = params['_id'];
})
}
}

0 comments on commit 9ad6c41

Please sign in to comment.