Skip to content

Commit

Permalink
Step 9.2: Added blaze-template with it's context
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 9ad6c41 commit dfa664a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions client/imports/components/list-show.component.ts
Expand Up @@ -2,16 +2,23 @@ import {Component, OnInit} from "@angular/core";
import {ActivatedRoute, Params} from "@angular/router";

@Component({
template: 'Hello ListShow!'
template: '<blaze-template *ngIf="templateContext" name="App_body" [context]="templateContext"></blaze-template>'
})
export class ListShowComponent implements OnInit {
private templateContext: any;

constructor(private currentRoute: ActivatedRoute) {

}

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

this.templateContext = {
main: "Lists_show_page",
_id: listId
};
});
}
}

0 comments on commit dfa664a

Please sign in to comment.