JonathanCedrim

Untitled

Dec 5th, 2020
816
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export class Demand {
  2.     id: number;
  3.     code: number;
  4.     note: string;
  5.  
  6.     public constructor( init?: Partial<Demand> ) {
  7.         Object.assign(this, init);
  8.     }
  9. }
  10.  
  11.  
  12. Quando for fazer o parse
  13.  
  14. this.demand = new Demand(this.demandForm.value);
  15.  
  16. Beneficio
  17.     -não precisa pegar valores de cada campo do formulario
  18.     -economia de linha
RAW Paste Data