controller from model
{
"version": "0.8.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.5.1",
"ember-data": "2.5.2",
"ember-template-compiler": "2.5.1"
}
}
<h1>Welcome to {{name}}</h1>
<br>
{{model}}
<br>
{{outlet}}
<br>
<br>
import Ember from 'ember';
export default Ember.Route.extend({
//controllerName: 'test',
model() {
var c = this.controllerFor('test');
return c.name;
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
name: 'test',
age: 20
});
import Ember from 'ember';
export default Ember.Controller.extend({
name: 'Ember Twiddle'
});