Ember App Kit Name Designation

What is the correct string representation of a resource to convey binding properties in an Ember application suite?

I have tried both of the following:

import Dependency from 'app/utils/utility';
export default Em.ObjectController.extend({
  sampleBinding: 'Dependency.value'
});

export default Em.ObjectController.extend({
  sampleBinding: 'utils:utility.value'
});

But snapping does not work in both cases.

Any help is appreciated.

Thank!

+3
source share
1 answer

I myself studied this and came across several things.

It seems that binding in this way is somewhat outdated in favor of using computed properties or aliases. Check out the comments on this: What is the difference between Ember.computed.alias and Ember.binding?

Or more specifically, comments on this github issue: https://github.com/emberjs/ember.js/issues/1164#issuecomment-23200023 ).

, , / . , , , . , , , :

export default Em.ObjectController.extend({
  needs: ['utility'],
  aliasedVariable: Ember.computed.alias('controllers.utility.variableOnUtility')
});

SO: Ember.js:

ember: http://emberjs.com/guides/controllers/dependencies-between-controllers/

+1

All Articles