-
Notifications
You must be signed in to change notification settings - Fork 27k
feat(transformers): inline styleUrls to view directive #2599
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
Conversation
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
|
CLA is because I forgot to setup my email when I did the commit. Should be fixed on the next rebase. |
|
@jakemac53 could you review? or is someone else more appropriate? |
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.
trailing commas are fine for dart lists, I would just drop this code and always append one
f25b8e6 to
0c2a758
Compare
|
A few remarks:
#2566 should be closed only when all that is implemented. Thanks. |
|
Sorry yes I was reading through the issue too fast and was missing some of the requirements. This will only support CSS inlining.
|
You need to resolve urls, inline imports in user provided styles
transformers code must inline templateUrl to template
The code already exists in the project. It should be possible to call it the transformers.
Good point, there should be an option to pass a custom UrlResolver to the transformer (I don't think there is a need to pass a custom /cc @mhevery |
Unfortunately for users this would require them to write their own transformer (it can't be done through a simple option in the pubspec). We probably do need to support it though regardless, but will need to create a good wiki page for how to set it up. |
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.
Since you don't need access to i anywhere I would do for (var url in urls) { ...
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.
Good Idea Done.
It seems reasonable to just drop support for this and remove the code from the project entirely? What benefit do we get by supporting both? |
While creating the ng_deps.dart file for a view inline the styleUrls attribute. This copies the pattern used for templateUrl, aleviating the need to make an XHR request for those resources. closes angular#2566
|
@vicb talked to Misko about this. I'm not closing #2566 but that work is not going to be part of this pull request. We need this internally so going to get it as part of the next release. Will make another pull request supporting baseUrl, but we are going to leave it as a Runtime step for now. Also the inlining of styles from the html page is low priority for us so we leave that for another time too. |
|
merged |
If you are referring to dropping support for
It has been closed by merging the PR which I think is reasonable. Should we create a new issue to track remaining work ? |
|
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. |
While creating the ng_deps.dart file for a view inline the styleUrls attribute.
This copies the pattern used for templateUrl, aleviating the need to make an
XHR request for those resources.
part of #2566