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 '@ember/component'; | |
import { action } from "@ember/object"; | |
export default Component.extend({ | |
foo: "1", | |
myAction: action(function() { console.log(this); alert("hi"); }), | |
}); |
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 { inject as service } from '@ember/service'; | |
import { action } from '@ember/object'; | |
import { dependentKeyCompat } from '@ember/object/compat'; | |
export default class ApplicationController extends Controller { | |
@service store; | |
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 Component from '@glimmer/component'; | |
import { action } from "@ember/object"; | |
const ThirtyMonths = new Set([ | |
4, | |
6, | |
9, | |
10, | |
]); |
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 { tracked } from "@glimmer/tracking"; | |
import { cached } from "ember-cached-decorator-polyfill"; | |
class Resource { | |
@tracked named = null; | |
@tracked positional = null; | |
constructor(update) { |
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 { tracked } from "@glimmer/tracking"; | |
import { cached } from "ember-cached-decorator-polyfill"; | |
async function fetchData(searchTerm) { | |
const data = []; | |
for (let i = 0; i < 10; i++) { | |
data.push({ | |
name: `Term: <${searchTerm}> search result ${i + 1}`, | |
}); |
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'; | |
count = 124479; | |
error = null; | |
constructor() { | |
super(...arguments); | |
const Arr1 = []; |
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'; | |
export default class 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 Component from '@glimmer/component'; | |
import { tracked } from "@glimmer/tracking"; | |
import { set, action } from "@ember/object"; | |
export default class extends Component { | |
@tracked ads = []; | |
@tracked selectedAdType = null; | |
// this is just here for funsies | |
get json() { |
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"; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
@tracked | |
foo = { ids: 6 }; | |
constructor() { | |
super(...arguments); |