ngOnInit()

in angular/src/app/stage/item-list/item-list.component.ts [32:62]


  ngOnInit() {
    let stageCode = this.activatedRoute.snapshot.params['stage'];
    this.namespaceCode = this.activatedRoute.snapshot.params['namespace'];

    this.stageService.list()
    .subscribe(
      (res: any) => {
        let stage = res.find(c => c.code === stageCode);
        this.stageCode = stage.code;
        this.stageEndpoint = stage.endpoint;

        this.search = {
          page: 1,
          pageSize: 10,
          queryMetadata: '',
          queryResource: '',
          lastTokenStack: ['0']
        };
    
        this.formGroup = this.fb.group({
          queryMetadata: new FormControl(this.search.queryMetadata),
          queryResource: new FormControl(this.search.queryResource)
        });
    
        this.searchEntities();
      },
      (err: any) => {
        this.formHelperService.showError('Errors.GenericError', null);
      }
    ); 
  }