Last active
February 25, 2016 14:43
-
-
Save g-cassie/3abc9219839257ff6b00 to your computer and use it in GitHub Desktop.
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
// my-addon/templates/components/addon-componenent.hbs | |
We are going to render a component here: | |
{{component selectedComponent}} | |
// my-app/components/app-component.js | |
Ember.Component.extend({ | |
// using ember inspect myService === undefined when using the application template below | |
myService: Ember.inject.service() | |
}); | |
// my-app/templates/components/app-component.hbs | |
This should have a value: {{myService.myValue}} | |
// my-addon/components/nested-addon-component.js | |
Ember.Component.extend({ | |
// this works fine | |
myService: Ember.inject.service() | |
}); | |
// my-addon/templates/components/nested-addon-component.hbs | |
This should have a value: {{myService.myValue}} | |
// my-app/application.hbs | |
{{addon-component selectedComponent='app-component'}} | |
{{addon-component selectedComponent='nested-addon-component'}} | |
/// output | |
This should have a value: | |
This should have a value: "some value" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment