Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Juniper mjuniper

View GitHub Profile
View controllers.application\.js
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
View gist:2caaffaff4d646cc23511999cd1ca3b7
let themes = [
'{"header":{"background":"#fff","text":"#000000"},"body":{"background":"#fff","text":"#4c4c4c","link":"#0079c1"},"button":{"background":"#0079c1","text":"#fff"},"logo":{"small":"https://arcgishub.maps.arcgis.com/sharing/rest/content/items/9d6a9bd32d0f480698f5cee208b27f90/data","link":"http://hub.arcgis.com"},"fonts":{"base":{"url":"","family":"Avenir Next"},"heading":{"url":"","family":"Avenir Next"}},"globalNav":{"background":"#efefef","text":"#323232"}}',
'{"header":{"background":"#fff","text":"#000000"},"body":{"background":"#fff","text":"#4c4c4c","link":"#7245db"},"button":{"background":"#0079c1","text":"#fff"},"logo":{"small":"https://arcgishub.maps.arcgis.com/sharing/rest/content/items/9d6a9bd32d0f480698f5cee208b27f90/data","link":"http://hub.arcgis.com"},"fonts":{"base":{"url":"","family":"Avenir Next"},"heading":{"url":"","family":"Avenir Next"}},"globalNav":{"background":"#efefef","text":"#000000"}}',
'{"header":{"background":"#e88140","text":"#ffffff"},"body":{"background":"#fef2ec
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
one: true,
two: true,
three: false,
all: Ember.computed.and('one', 'two', 'three')
});
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
});
View components.my-form.js
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'form',
submit() {
alert('yay');
return false;
}
});
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
attributeBindings: [ 'data-test' ]
});
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
// init () {
// this.set('model', { [numbers: [ 1 ]] });
// this._super(...arguments);
// },
model: Object.freeze([{ number: 1, text: 'one'}]),
actions: {
pushOne () {
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
// init () {
// this.set('model', { numbers: [ 1 ] });
// this._super(...arguments);
// },
model: Object.freeze({numbers:[ 1 ]}),
actions: {
pushOne () {
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
tagName: '',
actions: {
onClick () {
Ember.tryInvoke(this, 'onClickAction');
alert('log telemetry here!');
View components.json-le-event.js
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'script',
attributeBindings: [ 'type' ],
type: 'application/ld+json',
You can’t perform that action at this time.