Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
No provider for Params
-
Hello,
I am migrating my app from Ionic to Onsen (2.0.3, angular=2.1.2, router=3.1.2, angular2-onsenui=1.0.0-rc.1) and I am getting “No provider for Params” if I try to inject Params into the component. I tried to add “providers: [Params]”, but in that case I am getting an “Can’t resolve all parameters for Params” error. Do you have any recommendations how to move forward? Maybe it’s a wrong way to get navigator parameters or using mismatching Onsen/Angular/Bindings versions?
-
This post is deleted!
-
I was trying to figure out the cause by using kitchensink sample (https://github.com/OnsenUI/angular2-onsenui-kitchensink).
Params are injected in Dialog.ts and they work as expected, but if I add the same constructor:
constructor(params: Params) { }
to, for example, Forms.ts, it fails with the same error:
core.umd.js:3004 EXCEPTION: Uncaught (in promise): Error: Error in ./Forms class Forms_Host - inline template:0:0 caused by: No provider for Params! Error: No provider for Params! at NoProviderError.BaseError [as constructor] (http://localhost:3000/vendor.bundle.js:1118:39)
I still can not find any differences between these two components. Any recommendations?
UPDATE 1: As I understand,
TempDialog
component is not displayed directly asForms
orDialogs
components, and it is “pushable-only page”.