ember.js - ember-data - rerference class in template -


i writing ember-cli addon , want allow user of component generated addon use ember-data class source.

for example if have:

var employee = ds.model.extend({   // attrs });  export default employee; 

how can reference in template this;

{{x-autosuggest source=employee destination=chosenemployees searchpath="fullname" minchars=0}} 

the above undefined.

in bad old day of globals, have used app.employee:

{{x-autosuggest source=app.employee destination=chosenemployees searchpath="fullname" minchars=0}} 

how can reference class in template when using es6 modules?

what if pass instance of such class instead of class name itself? users can instantiate on route. moreover, they'd want extend or include mixin.

{{x-autosuggest source=employeeinstance destination=chosenemployees searchpath="fullname" minchars=0}}


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -