1

I have created SPFx webpart with angular2 and implemented routing and navigation but facing issue as below image:

Error:

enter image description here

1. WebPart structure:

enter image description here

2. app-routing.module.ts file

enter image description here

3.app.module.ts file

enter image description here

6
  • Check this. Let me know if it helps. Sep 3, 2019 at 6:09
  • I have already refereed this link but not working Sep 3, 2019 at 6:10
  • Please check if you have passed the correct relative URL for dashboard.component.html in templateUrl. Sep 3, 2019 at 6:14
  • I have passed templateUrl: './dashboard.component.html' Sep 3, 2019 at 6:16
  • Try passing complete absolute URL or ./dashboard/dashboard.component.html Sep 3, 2019 at 6:18

1 Answer 1

0

In Component.ts file have to change template url like this

enter image description here

Instead of,

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.