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({
});
View components.ember-input-wrapper.js
import Ember from 'ember';
export default Ember.Component.extend({
});
View components.my-component.js
import Ember from 'ember';
const { String: {htmlSafe}} = Ember;
export default Ember.Component.extend({
attributeBindings: ['ariaLabel'],
ariaLabel: 'Hello!',
didInsertElement() {
console.log(this.$()[0].outerHTML);
Ember.set(this, 'text', htmlSafe(`<pre><code>
${this.$()[0].outerHTML.replace('<', '&lt;')}
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
logger: Ember.inject.service(),
textBoxInDOM: Ember.computed(function()
{
let elem = document.getElementById('codeThing');
alert((typeof elem));
return (typeof elem);
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
});
View components.a-component.js
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'button',
click() {
Ember.get(this, 'log')('a component');
}
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
logger: Ember.inject.service('logger'),
appName: 'Ember Twiddle'
});
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',
names: ['Sergio', 'Alberto', 'Fran']
});