I am working on an angular app trying to call an child object method within a repeater. I have a selected item which has a company item. The company class has a getAddressText() method, which returns the address text for the company, which iw ould like to show on screen.
Below is the code to help my explanation. In the application I see that ctrl.selectedItem.Company is correctly loaded, but it appears to be ignoring the call to the function.
HTML + AngularJS code:
<span>{{ctrl.selectedItem.Company.getAddressText()}}</span>
Typescript:
namespace app.controllers {
class MyController {
public selectedItem: app.models.Item;
}
}
namespace app.models {
export class Item {
public Company: Company;
constructor() {}
}
export class Company {
constructor() {}
getAddressText(): string {
return "Some text...";
}
}
}
Item?