this.idWizard is a varibale component

Il giorno lunedì 18 novembre 2019 09:35:04 UTC+1, Raffaella Sinisi ha 
scritto:
>
> this is code:
>
> CHILD : header.component.ts
>
> export class HeaderComponent implements OnInit, OnChanges, DoCheck, 
> AfterViewChecked{
>  
>
 personId: string;
>  @Output() valueChanged : EventEmitter<any> = new EventEmitter<any>();
>
 idWizard: string;

>
>  ngOnInit() {
>  //PersonId
>  console.log('HEADER ngOnInit Person Id from route', this.route.snapshot.
> params.personId);   
>  this.route.paramMap.subscribe(params => {
>  console.log(params.get('personId'));
>  this.personId = params.get('personId');
>   
>
> if (this.personId != null){
>  var wi = new WizardDefinition(); 
>
>  wi.WiClient =  Number (this.personId);
>  wi.WiUser = '';
>  wi.WiOpenDate  =  new  Date();
>  wi.WiCloseDate =  new  Date();
>  wi.WiKey= 0;
>
>
>  console.log("HEADER  ngOnInit Creation Wizard:  OpenDate:  " +  wi.
> WiOpenDate + "CloseDate" + wi.WiCloseDate + "for id person" + this.
> personId);
> }
>  var response = this.was.postWizardStart(wi);
>  response.subscribe(res => { this.zone.run(() => {
>    this.idWizard = res.headers.get('idWizard');
>    console.log("HEADER  ngOnInit OK 200 Server - Idwizard is: " + this.
> idWizard);
>   this.emitValue(this.idWizard);
>  });
>  },
>   err  => {
>     console.log(err);
>    });
>  });
>
> }
>
>
> emitValue(value){
>     console.log("emitvalueToParent" );
>     this.valueChanged.emit(this.idWizard);
> }
>
> }
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/5c17ca58-e24b-4b3d-8046-88dd5aab25e3%40googlegroups.com.

Reply via email to