Currently utilizing "angular-ui-tree": "^2.22.5"
An issue arises when attempting to select the Do something
menu option ..
TypeError: this.$state is undefined
Is there a way to provide a reference to $state
in my function ..
MyController:
export class MyController {
public treeMenuItems = [
{
'handleClick': this.doSomething,
'name': 'Do something'
}
];
public treeMenuPopover = {
'items': this.treeMenuItems,
'placement': 'bottom',
'title': 'Actions'
};
constructor(public $state: ng.ui.IStateService) {}
public doSomething() {
this.$state.go('my.state');
}
}
MyController.$inject = ['$state'];