This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from '@glimmer/component'; | |
import { action } from '@ember/object'; | |
import { inject as service } from '@ember/service'; | |
export default class MyComponent extends Component { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
import { tracked } from '@glimmer/tracking'; | |
import { action } from '@ember/object'; | |
export default class MyController extends Controller { | |
appName = 'Ember Twiddle'; | |
@tracked first = 1; | |
@tracked second = 2; | |
@tracked third = 3; | |
@tracked another = 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
applicationController: Ember.inject.controller('application'), | |
thing: Ember.on('init', function() { | |
$('input.a').prop('checked', true); | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const i18n = require('./app/i18n'); | |
const translations = i18n.defaultLocales; | |
const input = require('./new-strings.json') | |
const getLanguage = locale => locale.match(/([a-z]{2,3})-?/)[1]; | |
const orderedJsonStringify = obj => JSON.stringify(Object.keys(obj).sort().reduce((r, k) => (r[k] = obj[k], r), {}), undefined, 2); | |
/* | |
This is a very very quickly hacked together tool to help importing a new string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
color: '"><h1>Injected</h1>', | |
style: Em.computed('color', function() { | |
return `background-color: ${this.get('color')}` | |
}) | |
}); |