Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve services API #97

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

wondersloth
Copy link
Contributor

  • Owner has been updated to late bind services in the dictionary of services until the lookup() method is called.
  • Service class now has a constructor with a single argument for an owner to be passed in, so that it can be bound to the object instance. Doing this allows for services to be decorated with other services.
  • The services property for the options object that is passed into renderComponent and renderToString methods now allows for either an pojo, constructor, or a Service. If the value in the service map is of type Service it can be decorated with services.

Copy link
Member

@chadhietala chadhietala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks great. Just some minor things.

packages/@glimmerx/core/src/owner.ts Outdated Show resolved Hide resolved
packages/@glimmerx/core/tests/render-tests.ts Outdated Show resolved Hide resolved
packages/@glimmerx/core/src/owner.ts Outdated Show resolved Hide resolved
packages/@glimmerx/core/src/owner.ts Outdated Show resolved Hide resolved
@wondersloth wondersloth changed the title Improve services API, for Improve services API Feb 16, 2021
@wondersloth wondersloth force-pushed the FEAT-services-improvements branch 3 times, most recently from 928e5d2 to c8b1a55 Compare February 16, 2021 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants