Iam testing Angular Element with SharePoint Framework (SPFX) Webpart, as Andrew Conell has described in his Blog

Every thing is working as asspected, i have added UI-Router in webpart just for testing how it works with Angular Element inside SPFX webpart. And as asspected routing is working, but no data is displayed on the MainComponent (Main page). I have added some test data in main.component.ts as below:

`public data: any[]; public heroes = [ {id: 1, name:'Superman'}, {id: 2, name:'Batman'}, {id: 5, name:'BatGirl'}, {id: 3, name:'Robin'}, {id: 4, name:'Flash'} ]; public test:string;

  let t = "main page...";
  this.test = t;
  this.data = this.heroes;


And in main.component.html:

<span>{{test}}</span> <table> <thead> <th>Name</th> <th>Index</th> </thead> <tbody> <tr *ngFor="let hero of data"> <td>{{hero.name}}</td> </tr> </tbody> </table>

And if i add same test data in my AppComponent then it works, data in table get displayed and even text string "test" is dislayed...

Here is my solution (SPFXAngularUIRouter) on GITHUB for testing...

I think i have same problom as described here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.