-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular 4 Error: No provider for PageRoute #741
Comments
@kinggolf you can actually just use import { ActivatedRoute } from '@angular/router';
constructor(private activatedRoute: ActivatedRoute) {}
ngOnInit() {
this.activatedRoute.params
.forEach((params) => { this.user = JSON.parse(params['user']); });
} even using |
Thank you @danielgek, but unfortunately this will not work for me as I am using this when navigating back a page and as stated in NS documentation, I need to use pageRoute. In fact, I am not passing any params back, I am just using pageRoute to trigger an action in the previous page, that otherwise is not triggered. But when upgrading to Angular 4, I am getting the error I reported. Thanks again. |
Same issue here. I was playing with NS v3 rc1 and it uses Angular 4. I get |
Same here. I would prefer PageRoute instead of ActivatedRoute as it is a bit of a cumbersome solution. |
Hi @kinggolf @danielgek @aggiustino @intermadix, Archive.zip |
Instanciate child injectors with a providers' map for outlet specific providers such as Page, PageRoute, ActivatedRoute, etc. fixes #741
Instantiate child injectors with a providers' map for outlet specific providers such as Page, PageRoute, ActivatedRoute, etc. fixes #741
This issue also occured on NativeScript version |
Hey all, We are working on the issue and will probably release a patch version with the fix in a few days. Thanks for reporting that! |
Instantiate child injectors with a providers' map for outlet specific providers such as Page, PageRoute, ActivatedRoute, etc. fixes #741
Instantiate child injectors with a providers' map for outlet specific providers such as Page, PageRoute, ActivatedRoute, etc. fixes #741
Instantiate child injectors with a providers' map for outlet specific providers such as Page, PageRoute, ActivatedRoute, etc. fixes #741
Hey @kinggolf, We just published nativescript-angular@1.5.2 with the fix. Yes, it will be included in nativescript-angular@3.0.0 as well. CC: @danielgek, @aggiustino, @intermadix |
well i am using "nativescript-angular": "~5.1.0", but the issue remained the same |
Hey @MuhammadTahir92 - There is no need to use |
Upgraded my app to Angular 4 today and am receiving this error when
tns run ios
: No provider for PageRoute.page.json dependencies:
tns doctor
shows no issues.Removed node_modules, platform, & hooks folders,
npm cache clear
,npm install
, and re-ran, but still same error.In my component:
import { PageRoute } from "nativescript-angular/router";
&
This worked Angular 2.4.8 & nativescript-angular 2.4.1.
The text was updated successfully, but these errors were encountered: