Inheritance with Angular 5

Posted by: pascal.hanel on 23 January 2018, 3:41 am EST

    • Post Options:
    • Link

    Posted 23 January 2018, 3:41 am EST

    Hi,

    I have a problem with my custom grid filter component, which inherits from the WjFlexGridFilter.

    My custom filter looks like this:

    
    @Component({
      selector: 'core-pgrid-filter',
      templateUrl: 'pgrid-filter.template.html',
      styleUrls: ['pgrid-filter.style.scss'],
      inputs: [...wjFlexGridFilterMeta.inputs],
      outputs: [...wjFlexGridFilterMeta.outputs],
      providers: [
        { provide: 'WjComponent', useExisting: forwardRef(() => PgridFilterComponent) },
        ...wjFlexGridFilterMeta.providers
      ]
    })
    export class PgridFilterComponent extends WjFlexGridFilter implements OnInit, AfterViewInit {
      @Input('gridCv') private gridCv: PgridCollectionView<IRow>;
      @Input('pgrid') private pgrid: PgridComponent;
    
      //... some more stuff
    }
    
    

    I’m importing my custom components from my own node_module. There are no errors on build, but as soon as I open a page where my custom component is used, I’m getting this error:

    When removing the keys ‘inputs’, ‘outputs’ and ‘providers’ from my @Component declaration, the page gets rendered completely. But I don’t have the functionality which I would like to inherit from the WjFlexGridFilter.

    I’m using Angular 5.2.0 and Wijmo 5.20173.403

    Any help is appreciated.

    Thank you

  • Posted 23 January 2018, 5:19 pm EST

    Hi,

    We are sorry, we are unable to replicate the issue at our end with build 5.20173.403. Please refer to the attached sample for the same.

    If the issue persists, please modify the attached sample depicting your issue.

    ~Manish

    CustomFlexGridwithFilter_403.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels