Skip to content

Commit

Permalink
Step 6.13: Subscribe to get the partyId
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkisiela authored and dotansimha committed Nov 27, 2016
1 parent 0961f24 commit 3312474
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions client/imports/app/parties/party-details.component.ts
@@ -1,9 +1,24 @@
import { Component } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';

import 'rxjs/add/operator/map';

import template from './party-details.component.html';

@Component({
selector: 'party-details',
template
})
export class PartyDetailsComponent {}
export class PartyDetailsComponent implements OnInit {
partyId: string;

constructor(
private route: ActivatedRoute
) {}

ngOnInit() {
this.route.params
.map(params => params['partyId'])
.subscribe(partyId => this.partyId = partyId);
}
}

0 comments on commit 3312474

Please sign in to comment.