You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've read through https://github.com/ui-router/ng1-to-ng2 and my app is working great, ng1 routing still works and now I can use uiSref in my ng2 component. But my unit test fails for the ng2 component that is using uiSref.
In the test.component.html there's an uiSref, if I comment it out the test runs fine, otherwise it fails with
"No provider for $uiRouter".
This is also a component that is not registered with the router, it's just a small component that is being used on the page.
Any help would be much appreciated, thanks.
Edit: I made some changes and removed importing AppModule in the spec file and instead declared the component in there. This fixes the issue of "No provider for $uiRouter", but now I get an error saying [uiParams] is not a valid attribute for the 'a' tag.
The text was updated successfully, but these errors were encountered:
I've read through https://github.com/ui-router/ng1-to-ng2 and my app is working great, ng1 routing still works and now I can use uiSref in my ng2 component. But my unit test fails for the ng2 component that is using uiSref.
Here's the code for the unit test and the app.module
https://gist.github.com/miked1090/d6a2e99f8e3dcaa6f27a9b2b7d5840a4
In the test.component.html there's an uiSref, if I comment it out the test runs fine, otherwise it fails with
"No provider for $uiRouter".
This is also a component that is not registered with the router, it's just a small component that is being used on the page.
Any help would be much appreciated, thanks.
Edit: I made some changes and removed importing AppModule in the spec file and instead declared the component in there. This fixes the issue of "No provider for $uiRouter", but now I get an error saying [uiParams] is not a valid attribute for the 'a' tag.
The text was updated successfully, but these errors were encountered: