Relative URL support in annotations
See original GitHub issueGOAL
support loading resources into the components in a relative way for re-usability.
JavaScript
CommonJS modules standards publishes the module.id
, which can be passed into the @View
Annotation.
@Component(...)
@View({
moduleId: module.id, // commonJS standard
templateUrl: 'my-component.html',
styleUrls: ['my-component.css']
})
class MyComponent {
}
Dart
In dart the user does not have to explicitly set the moduleId
instead we can extract the location from the library path: MyComponent.owner.uri.path
See: uri_mapper
In-lining
Later we could add a pre-deploy step which will inline the URLs into the annotations directly.
Issue Analytics
- State:
- Created 8 years ago
- Comments:45 (28 by maintainers)
Top Results From Across the Web
Has outgoing hreflang annotations using relative URLs
This means that the URL in question has hreflang annotations that have at least one outgoing hreflang annotation which is referenced as a...
Read more >The @Path Annotation and URI Path Templates
The @Path annotation's value is a partial URI path template relative to the base ... the user name “Galileo,” the web service responds...
Read more >Issue with page “Has outgoing hreflang annotations using ...
Has outgoing hreflang annotations using relative URLs issue means that the URL has hreflang annotations that have at least one outgoing ...
Read more >Spring MVC: Relative URL problems - java - Stack Overflow
Problem 2) I tried using spring:url tag to generate the absolute paths for me, which usually works great. But when I put a...
Read more >Enforce relative links (instance security hardening)
When set to true, only relative URLs are permitted through the /ess/catalog.do page using the uri parameter. · When set to false, all...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@pkozlowski-opensource I can’t make this to work… Does anyone have any sample with ES6 and SystemJS? According to them, __moduleName would work, but it doesn’t because it is being parsed to $__moduleContext.id which is undefined, since $__moduleContext evaluates to the moduleName
Thank you!
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.