feat(core): support styles and styleUrl as strings#51715
feat(core): support styles and styleUrl as strings#51715crisbeto wants to merge 1 commit intoangular:mainfrom
Conversation
|
Hello @crisbeto This example below looks like it accepts multiple urls because of the naming. Imo, The correct way it should look like is: But that would require big changes I believe. |
|
Yeah, I agree that the naming is problematic, but I think that splitting it on the comma would be weird as well. Introducing a |
|
My two cents here: the Angular API already has at least one other place where it uses the plural form to also accept a single thing: https://angular.io/api/forms/AbstractControlOptions. So keeping |
345c50e to
4a55966
Compare
|
Based on what we discussed with @jelbourn: I've introduced a new |
4a55966 to
3b94c22
Compare
pkozlowski-opensource
left a comment
There was a problem hiding this comment.
LGTM
Reviewed-for: public-api
Reviewed-for: fw-core
Adds support for passing in `@Component.styles` as a string. Also introduces a new `styleUrl` property on `@Component` for providing a single stylesheet. This is more convenient for the most common case where a component only has one stylesheet associated with it.
3b94c22 to
1d26f71
Compare
jessicajaniuk
left a comment
There was a problem hiding this comment.
reviewed-for: fw-core, fw-testing, public-api
|
This PR was merged into the repository by commit 59387ee. |
|
Thank you guys, I know this is a silly small thing but it's really something I bet all developers have come across: it really makes the developing experience better, because 99% of all cases there'll only be 1 styles file. Thanks!!! |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds support for passing in `@Component.styles` as a string. Also introduces a new `styleUrl` property on `@Component` for providing a single stylesheet. This is more convenient for the most common case where a component only has one stylesheet associated with it. PR Close angular#51715
Adds support for passing in
@Component.stylesas a string. Also introduces a newstyleUrlproperty on@Componentfor providing a single stylesheet. This is more convenient for the most common case where a component only has one stylesheet associated with it.