View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
arr: Ember.A([]),
theLength: Ember.computed('arr[]', function() {
return this.get('arr').length;
}),
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['green-border']
});
View components.data-binding.js
import Ember from 'ember';
function logLifeCicle(name) {
return function() {
console.log(name, ...arguments);
};
}
export default Ember.Component.extend({
bar: 0,
View components.data-binding.js
import Ember from 'ember';
function logLifeCicle(name) {
return function() {
console.log(name, arguments);
};
}
export default Ember.Component.extend({
bar: 0,
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
});
View components.my-component.js
import Ember from 'ember';
export default class MyComponent extends Ember.Component {
tagName = '';
constructor() {
super(...arguments);
// Empty string causes runtime error
// "Assertion Failed: You cannot use `elementId` on a tag-less component"
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
numbers: [{ number: 1 }, { number: 2 }, { number: 3 }].mapBy('number')
});
View components.ember-input-wrapper.js
import Ember from 'ember';
export default Ember.Component.extend({
});