I'm struggling to get this functionality working properly. It seems like it should be a simple task, but I can't seem to instantiate the CompanyType object in my page/component correctly.
Below is an excerpt from the Interfaces.ts file:
export interface CompanyType {
address1: string,
address2: string,
address3: string,
...
...
}
And here is the relevant code snippet from the Ionic page:
...
...
import { CompanyType } from '../../models/Interfaces';
export class CompanyDetailPage {
company: CompanyType;
constructor(public navCtrl: NavController, public navParams: NavParams) {}
ionViewDidLoad() {
// Save nav params to company object
this.company = this.navParams.get('company');
}
}
The navParams are being passed through successfully. If I log the following line of code, it shows the correct value:
console.log(this.company.address1) // Prints the correct value
However, the value is not appearing in the view when using the interpolation syntax:
{{ company.address1 }}