Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Overload "component" method to accept object map of components #16062

Merged
merged 3 commits into from
Jul 3, 2017
Merged

Overload "component" method to accept object map of components #16062

merged 3 commits into from
Jul 3, 2017

Conversation

ksvitkovsky
Copy link
Contributor

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
feature

What is the current behavior? (You can also link to an open issue here)
"component" method does not allow multiple components registration

What is the new behavior (if this is a feature change)?
"component" method accepts object as a parameter where the keys are component names and the values are the component definition objects

Does this PR introduce a breaking change?
no

Please check if the PR fulfills these requirements

Ensure that all components are being registered and the method returns a module instance
when object is being used as first parameter

Required for feature #14579
…omponents

Register multiple components with single call as it is possible with other module units.

As requested in #14579
@gkalpak
Copy link
Member

gkalpak commented Jun 23, 2017

I am not a big fan of this "feature" in other APIs (.directive(), .service(), .provider(), etc) either. It adds unnecessary complexity to the APIs for very little benefit (that could be achieved by an external helper).

It's 👎 from me.

@ksvitkovsky
Copy link
Contributor Author

In my defense, it was requested in #14579 which has "pr's plz" label 😊

@frederikprijck
Copy link
Contributor

I am not a big fan of this "feature" in other APIs (.directive(), .service(), .provider(), etc) either

Imho it should be atleast the same for both components and directives. I find it confusing that a directive offers this way to register but a component does not.

@Narretz
Copy link
Contributor

Narretz commented Jun 26, 2017

I suggested that we would merge if a PR was provided, simply because it makes the API consistent with that of directive()

@gkalpak
Copy link
Member

gkalpak commented Jun 29, 2017

Just to be clear, I don't feel strongly about this. I just don't like it (which is my personal preference), but if others think it's fine I won't stand in your way 😁

@Narretz
Copy link
Contributor

Narretz commented Jun 29, 2017

Ok. @ksvitkovsky once you provide the tests we can move this forward.

@Narretz Narretz modified the milestones: Backlog, Ice Box Jun 29, 2017
@ksvitkovsky
Copy link
Contributor Author

@Narretz I added the tests in the first commit, should I add more cases?

@Narretz
Copy link
Contributor

Narretz commented Jun 29, 2017

@ksvitkovsky Oh, someone tagged this as "needs test". Sorry. I will review and get back if anything else is needed.

@Narretz Narretz self-assigned this Jun 29, 2017
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

1 similar comment
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@ksvitkovsky
Copy link
Contributor Author

um, I'm okay if that does matter 😄

@Narretz Narretz merged commit 57a972d into angular:master Jul 3, 2017
@Narretz
Copy link
Contributor

Narretz commented Jul 3, 2017

@ksvitkovsky No worries, this message is only for maintainers - it happens when the commits in the PR are by more than 1 author. Since it's only you (who has signed the CLA) and me, we're good. ;)

Narretz pushed a commit that referenced this pull request Jul 3, 2017
…nents

Register multiple components with single call as it is possible with other module units.

Closes #14579 
Closes #16062
@ksvitkovsky ksvitkovsky deleted the feature-gh-14579 branch July 3, 2017 09:55
@ksvitkovsky
Copy link
Contributor Author

@Narretz cool, thanks 😊

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants