Skip to content

Instantly share code, notes, and snippets.

@klinki
Created May 3, 2017 21:37
Show Gist options
  • Save klinki/3d447f43e3c446f51480deb66238a733 to your computer and use it in GitHub Desktop.
Save klinki/3d447f43e3c446f51480deb66238a733 to your computer and use it in GitHub Desktop.
import { Component, OnInit } from '@angular/core';
import { Crisis } from './crisis.service';
@Component({
template: `.......`
})
export class CrisisDetailComponent implements OnInit, OnChanges {
editName: string;
@RouteParam()
@Input()
private crisis: Crisis;
ngOnChanges(changes: SimpleChange) {
if (changes.crisis) {
editName = changes.crisis.name;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment