in the controller defined statements property :
export default Ember.Controller.extend({
…
statements : ,
…
}),
I try to get this property in function but the property not recognized :
let scatterController = Ember.inject.controller(‘sqlserver.pi.scatter-chart-analyitics’); // my controller
function getStatments() {
scatterController.statements ;
}
Try this:
function getStatments() {
scatterController.get('statements');
}
You generally need to use .get('$property_name')
when accessing properties in Ember objects.
thanks,
I try it. but it’s not help
If I am not wrong , Ember.inject.controller doesnt returns you the controller itself , It injects the requested controller in the required controller.
For Eg:
scatterController : Ember.inject.controller('sqlserver.pi.scatter-chart-analyitics'),
getStatments : function(){
return this.get('scatterController.statements');
}