-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add minimal reproduction with passing test (upgrade to Ember 3.21.1 f…
…or failure
- Loading branch information
Showing
25 changed files
with
320 additions
and
58 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import RESTAdapter from '@ember-data/adapter/rest'; | ||
|
||
export default class ChildAdapter extends RESTAdapter { | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import RESTAdapter from '@ember-data/adapter/rest'; | ||
|
||
export default class ParentAdapter extends RESTAdapter { | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<img src={{@src}} {{did-update this.handleUpdateSrc @src}} /> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Component from '@glimmer/component'; | ||
import { action } from '@ember/object'; | ||
|
||
export default class MyComponent extends Component { | ||
@action | ||
handleUpdateSrc() { | ||
console.log('here'); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Controller from '@ember/controller'; | ||
import { inject } from '@ember/service'; | ||
|
||
export default class ApplicationController extends Controller { | ||
@inject myService; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export function initialize(appInstance) { | ||
const store = appInstance.lookup('service:store'); | ||
const myService = appInstance.lookup('service:my-service'); | ||
|
||
store.pushPayload('parent', { | ||
parent: { | ||
id: 1, | ||
name: 'Parent 1', | ||
avatarURL: 'parent.jpg', | ||
child: 1 | ||
} | ||
}); | ||
|
||
store.pushPayload('child', { | ||
child: { | ||
id: 1, | ||
name: 'Child 1', | ||
avatarURL: 'child.jpg' | ||
} | ||
}); | ||
|
||
myService.parent = store.peekRecord('parent', 1); | ||
} | ||
|
||
export default { | ||
initialize | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Model, { attr, belongsTo } from '@ember-data/model'; | ||
|
||
export default class ChildModel extends Model { | ||
@attr() name; | ||
@attr() avatarURL; | ||
|
||
@belongsTo('parent', { async: false, inverse: 'child' }) parent; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Model, { attr, belongsTo } from '@ember-data/model'; | ||
|
||
export default class ParentModel extends Model { | ||
@attr() name; | ||
@attr() avatarURL; | ||
|
||
@belongsTo('child', { async: false }) child; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Route from '@ember/routing/route'; | ||
import { inject } from '@ember/service'; | ||
|
||
export default class ApplicationRoute extends Route { | ||
@inject store; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import RESTSerializer from '@ember-data/serializer/rest'; | ||
|
||
export default class ChildSerializer extends RESTSerializer { | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import RESTSerializer from '@ember-data/serializer/rest'; | ||
|
||
export default class ParentSerializer extends RESTSerializer { | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Service from '@ember/service'; | ||
|
||
export default class MyServiceService extends Service { | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
{{!-- The following component displays Ember's default welcome message. --}} | ||
<WelcomePage /> | ||
{{!-- Feel free to remove this! --}} | ||
|
||
{{outlet}} | ||
<MyComponent @src={{this.myService.parent.child.avatarURL}} /> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.