Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. <p-multiSelect title="Selecione" formControlName="jogos" [options]="listCustomers_itm" [filter]="true"></p-multiSelect>
  2.  
  3. configurarFormularioEdit(){
  4. this.formularioEdit = this.formBuilder.group({
  5. id:[''],
  6. nome: [null, Validators.required],
  7. email: [null,Validators.required],
  8. cpf: [null,Validators.required],
  9. rua: [null,Validators.required],
  10. bairro: [null,Validators.required],
  11. cidade: [null,Validators.required],
  12. UF: [null,Validators.required],
  13. jogos: [[],Validators.required],
  14. tipo_cliente: ['N']
  15. });
  16.  
  17. this.clienteService.getVeiculos().subscribe(
  18. data => {
  19. this.jogoList = data;
  20. this.listCustomers_itm = [];
  21. for (let c of this.jogoList) {
  22. this.listCustomers_itm.push({ label: c.placa, value: c.id });
  23. }
  24.  
  25. }
  26. );
  27.  
  28. getVeiculos(){
  29. let token = localStorage.getItem('token');
  30. return this.http.get<Veiculo[]>(this.getAllVeiculos, { headers: {'Authorization':`Bearer ${token}`}});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement