This file contains hidden or 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 { | |
| get isFooEqualToFoo() { | |
| return this.args.foo === this.args.foo; | |
| } | |
| } |
This file contains hidden or 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 { | |
| get foo() { | |
| return this.args.foo; | |
| } | |
| } |
This file contains hidden or 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 JSONAPIAdapter from 'ember-data/adapters/json-api'; | |
| export default class PostAdapter extends JSONAPIAdapter { | |
| async findRecord(store, type, id) { | |
| switch (id) { | |
| case '1': | |
| return { | |
| "data": { | |
| "id": "1", | |
| "type": "posts", | |
| "links": { |
This file contains hidden or 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 { inject } from '@ember/service'; | |
| import { computed } from '@ember/object'; | |
| export default Ember.Controller.extend({ | |
| router: inject(), | |
| init(...args) { | |
| this._super(...args); | |
| const routeInfo1 = this.router.recognize('/foo/1?hello=bonjour'); |
This file contains hidden or 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 { inject } from '@ember/service'; | |
| import { computed } from '@ember/object'; | |
| export default Ember.Controller.extend({ | |
| router: inject(), | |
| fooBarUrl: computed(function() { | |
| return this.router.urlFor('foo.bar', 123, 456); | |
| }), | |
| bazQuxUrl: computed(function() { |
This file contains hidden or 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 function() { | |
| //window.server = this; | |
| this.get('users'); | |
| this.patch('users/:id'); | |
| }; |
This file contains hidden or 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' | |
| }); |