I have displayed a textbox using Ember.View. In model i had specified all the details of the input.
App.Display = DS.Model.extend({
inputText: DS.attr('string'),
width: DS.attr('string'),
height: DS.attr('string'),
className: DS.attr('string')
})
App.Display.FIXTURES = [{
id: '1',
innnerText : 'helo',
width: '197px',
height: '25px',
className: 'DisplayClass'
}]
from the model how can i append the className , width,height and innerText to the display unit.
Here is my displayView
<script type="text/x-handlebars" data-template-name="_display">
{{#view 'App.DisplayView'}}{{/view}}
</script>
App.DisplayView = Ember.View.extend({
tagName: 'input',
});
App.DisplayController = Ember.ArrayController.extend({
actions: {
}
});
How to populate the model data (i.e. innerText,dimensions,className) through controller to the view. Note:Im not using any this.resource('somename')
In IndexRoute i have set the controller
setupController: function (controller, model) {
controller.set('model', model);
Aucun commentaire:
Enregistrer un commentaire