-
-
Save NullVoxPopuli/77bd99cd40e1ff8122687cca2e6a09d0 to your computer and use it in GitHub Desktop.
Revisions
-
NullVoxPopuli revised this gist
May 26, 2021 . 2 changed files with 7 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,16 @@ import Controller from '@ember/controller'; import { inject as service } from '@ember/service'; import { tracked } from 'tracked-built-ins'; import { set } from '@ember/object'; export default class ApplicationController extends Controller { appName = 'Ember Twiddle'; @service store; user = tracked({ fullname: '', profile: '', }); constructor() { @@ -23,7 +23,7 @@ export default class ApplicationController extends Controller { await new Promise(resolve => setTimeout(resolve, 100)); // fake network const fullname = `first last`; this.user.fullname = fullname; this.user.profile = 'some url'; } } 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 charactersOriginal file line number Diff line number Diff line change @@ -18,6 +18,7 @@ }, "addons": { "@glimmer/component": "1.0.0", "ember-data": "3.18.0", "tracked-built-ins": "1.1.1" } } -
NullVoxPopuli revised this gist
May 26, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export default class ApplicationController extends Controller { } async pretendQueryRecord() { await new Promise(resolve => setTimeout(resolve, 100)); // fake network const fullname = `first last`; set(this.user, 'fullname', fullname); -
NullVoxPopuli revised this gist
May 26, 2021 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,6 @@ export default class ApplicationController extends Controller { user = { fullname: '', profile: '', }; -
NullVoxPopuli revised this gist
May 26, 2021 . No changes.There are no files selected for viewing
-
NullVoxPopuli revised this gist
May 26, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export default class ApplicationController extends Controller { appName = 'Ember Twiddle'; @service store; user = { fullname: '', profile: '', -
NullVoxPopuli revised this gist
May 26, 2021 . No changes.There are no files selected for viewing
-
NullVoxPopuli revised this gist
May 26, 2021 . 2 changed files with 14 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,15 +9,22 @@ export default class ApplicationController extends Controller { @tracked user = { fullname: '', profile: '', }; constructor() { super(...arguments); this.pretendQueryRecord(); } async pretendQueryRecord() { await Promise.resolve(); // fake network const fullname = `first last`; set(this.user, 'fullname', fullname); set(this.user, 'profile', 'some url'); } } 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 charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,5 @@ <br> <App @user={{this.user}} /> <br> <br> {{this.error}} -
luffybyte revised this gist
May 26, 2021 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,8 @@ export default class ApplicationController extends Controller { @service store; @tracked user = { fullname: '', profile: '', }; constructor() { -
luffybyte created this gist
May 26, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ import Component from '@glimmer/component'; export default class extends Component { } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ import Component from '@glimmer/component'; export default class extends Component { } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ import Controller from '@ember/controller'; import { inject as service } from '@ember/service'; import { tracked } from '@glimmer/tracking'; import { set } from '@ember/object'; export default class ApplicationController extends Controller { appName = 'Ember Twiddle'; @service store; @tracked user = { fullname: 'Test', profile: 'testurl', }; constructor() { super(...arguments); this.store.queryRecord('user', {}).then((user) => { const fullname = `${user.firstName} ${user.lastName}`; set(this.user, 'fullname', fullname); set(this.user, 'profile', user.profile?.url); }); } } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ import Model from 'ember-data/model'; import attr from 'ember-data/attr'; /* import attr from 'ember-data/attr'; import { belongsTo, hasMany } from 'ember-data/relationships'; */ export default class extends Model { @attr('string') firstName; @attr('string') lastName; @attr() profile; } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ <h1>Welcome to {{this.appName}}</h1> <br> <br> <App @user={{this.user}} /> <br> <br> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ <h1> SOME EXAMPLE </h1> <User @user={{@user}}/> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ <h2>USer details </h2> name: {{@user.fullname}} <br> profile: {{@user.profile}} 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ { "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": { "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js", "ember": "3.18.1", "ember-template-compiler": "3.18.1", "ember-testing": "3.18.1" }, "addons": { "@glimmer/component": "1.0.0", "ember-data": "3.18.0" } }