angular - TypeError: undefined is not a constructor (evaluating 'new viewClass()') -


i using nativescript-intro-slides library, followed angular example mentioned facing error:

    class listcomponent - inline template:1:8 original exception:  typeerror: undefined not constructor (evaluating 'new viewclass()')  original stacktrace: createandattach@file:///app/tns_modules/nativescript-angular/view-util.js:90:33 

my code:

import {component,elementref, oninit, viewchild} "@angular/core"; import {registerelement} "nativescript-angular/element-registry"; registerelement("slide", () => require("nativescript-intro-slides").slide); registerelement("slidecontainer", () => require("nativescript-intro-slides").slidecontainer);  @component({     moduleid: module.id,     selector: "list-page",     template: `         <slidecontainer angular="true" #slides>             <slide *ngfor="let img of images">                 <label [text]="img.title"></label>             </slide>         </slidecontainer>     ` })  export class listcomponent implements oninit {     public images: array<any> = [];     @viewchild("slides") slides: elementref;     ngoninit() {         this.images.push({title: 'sports'});         this.images.push({title: 'cats'});         this.images.push({title: 'food'});     }     ngafterviewinit() {         let slidesxml = this.slides.nativeelement;         slidesxml.constructview();     } } 

plus not find method constructview. thank you

nativescript-intro-slides library has lot of problems owner recommends using new version nativescript-slides

enter image description here


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -