Last active
May 30, 2020 15:46
-
-
Save gossi/c965eb18b7f6938726fd5333caa87d4e to your computer and use it in GitHub Desktop.
no-controller
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 Route from '@ember/routing/route'; | |
import { tracked } from '@glimmer/tracking'; | |
import { action } from '@ember/object'; | |
export default class ApplicationRoute extends Route { | |
@tracked foo = 'foo'; | |
get bar() { | |
return `${this.foo} bar`; | |
} | |
model() { | |
return { | |
foo: this.foo, | |
bar: this.bar, | |
helloWorld: this.helloWorld, | |
updateFoo: this.updateFoo | |
}; | |
} | |
@action | |
updateFoo(event) { | |
this.foo = event.target.value; | |
} | |
@action | |
helloWorld() { | |
console.log('hello world:', this.bar); | |
} | |
} |
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
{ | |
"version": "0.17.1", | |
"EmberENV": { | |
"FEATURES": {}, | |
"_TEMPLATE_ONLY_GLIMMER_COMPONENTS": false, | |
"_APPLICATION_TEMPLATE_WRAPPER": true, | |
"_JQUERY_INTEGRATION": true | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"ember": "3.18.1", | |
"ember-template-compiler": "3.18.1", | |
"ember-testing": "3.18.1" | |
}, | |
"addons": { | |
"@glimmer/component": "1.0.0", | |
"ember-simple-set-helper": "0.1.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment