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 { computed } from '@ember/object'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
firstName = 'Abe'; | |
lastName = 'Simpson'; | |
@computed('firstName', 'lastName') | |
get fullName() { |
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', | |
outerFormSubmitted: false, | |
innerFormSubmitted: false | |
}); |
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'; | |
import moment from 'moment'; | |
import { computed } from '@ember/object'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
date: moment(), | |
altFormat: computed('date', function() { | |
let date = this.get('date'); | |
let result = date.year() === 2018 ? "j M (h:iK)" : "j M (h:iK) Y"; // If not 2018, show year |
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'; | |
import Table from 'ember-light-table'; | |
const { computed, Component, get, set } = Ember; | |
export default Component.extend({ | |
init() { | |
this._super(...arguments); | |
set(this, 'table', new Table(get(this, 'columns'), get(this, 'model'))); |
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
export default Ember.Controller.extend({ | |
lat: -27.5555, | |
lng: 152.94703, | |
zoom: 7, | |
test1:[-27.5555, 152.94703], | |
test2:[-27.69149, 153.01561], | |
}); |
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' | |
}); |