-
-
Notifications
You must be signed in to change notification settings - Fork 871
Introduce "Application Concerns" section. #848
Conversation
the key `logger:main`: | ||
|
||
```app/initializers/logger.js | ||
export function initialize(application) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exporting a bare function like this is OK? Doesn't this need the Ember.Application.initializer(
call?
(applies to several code snippets through this content)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this is only a partial initializer implementation. The part that's left off would be:
export default {
name: 'logger',
initialize: initialize
};
I should just add this for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and to all the other initializer examples on this page.
👏 |
4cc319f
to
4308b37
Compare
Thanks for the review @mixonic. Just pushed a revision. |
Replaces the "Services and Initializers" section and expands its content to include pages explaining Applications and Instances, as well as Dependency Injection. All the examples and text have been reviewed and updated for clarity and compatibility with Ember 2.1. One caveat is that the Initializers page references the `instance-initializer` generator, which is still a WIP at the moment. I'll try to get that into CLI ASAP.
4308b37
to
878d5b4
Compare
This looks really awesome! I just have two thoughts about it:
Thanks for the great work! |
I agree that the run loop section would be a better fit here. I think that we need to lead with the "applications and instances" section because the distinction is a bit confusing without an explanation, and the distinction is referenced throughout the initializers and DI sections. The container section has been absorbed by the DI section and no longer exists on its own. |
Introduce "Application Concerns" section.
Thanks for all your work on this, @dgeb! |
@michaelrkn glad to help! Let's revisit your ordering / organization concerns with separate PRs. I strongly agree about the run loop section being a better fit here than under components. Also, maybe the sub-section order could be tweaked a bit. Still waiting to resolve the |
Sounds good!! |
Replaces the "Services and Initializers" section and expands its
content to include pages explaining Applications and Instances, as
well as Dependency Injection.
All the examples and text have been reviewed and updated for
clarity and compatibility with Ember 2.1.
One caveat is that the Initializers page references the
instance-initializer
generator, which is still a WIP at themoment. I'll try to get that into CLI ASAP.
Closes #827, #789, and #771.