Skip to content

Instantly share code, notes, and snippets.

@ti-ka
Created October 5, 2017 21:25
Show Gist options
  • Save ti-ka/cf4c2d4e648f7a295b3f2251f8ee938f to your computer and use it in GitHub Desktop.
Save ti-ka/cf4c2d4e648f7a295b3f2251f8ee938f to your computer and use it in GitHub Desktop.
import {Component, forwardRef, Input} from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { Principal } from '../../models/entities';
import { Exportable } from './../Exportable';
@Component({
selector: 'edit-principal',
templateUrl: './edit.html',
styleUrls: ['../component.css'],
providers: [{provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => EditPrincipalComponent),
multi: true}],
})
export class EditPrincipalComponent extends Exportable {
@Input() public isPhEditing = false;
public model: Principal;
constructor() {
super();
if (this.model == null) {
this.model = new Principal();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment