However I’m only getting the error : error_handler.js:45 EXCEPTION: Error in ./SubjectPage class SubjectPage_Host - inline template:0:0 caused by: Cannot read property ‘get’ of undefined
NavParams is seen as undefined. Am I importing and declaring it incorrectly?
@pe1 solution sounds good. however, if still not good, try to access navParams in ionViewWillEnter() instead of placing the getter in the constructor like
I changed the NavParams to be the second parameter instead of the third and all of the sudden it was working. Strange… Does anyone have any idea why changing the order should have mattered?
I had a similar problem after upgrading from RC0 to RC3 today.
With RC0, I used ionViewDidLoad to get my param and it worked.
With RC3, I got the following error: undefined is not an object (evaluating ‘this.context.item.Kz’…), sidenote: param is a Model (Object).
Finally solved it by moving the param code (this.item = this.params.data.item) to the constructor.
My issue was, that the ionViewDidLoad was firing too late, the view tried to get properties from the item and therefore produced the error.
I’m having this same issue with RC3. Was working before (I think RC1) but now I can’t get the array passed into NavParams. I tried putting it in the constructor, onLoad, onEnter, and wrapping it in a promise in each and still no luck.