question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Relative URL support in annotations

See original GitHub issue

GOAL

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:closed
  • Created 8 years ago
  • Comments:45 (28 by maintainers)

github_iconTop GitHub Comments

5reactions
tbragafcommented, Feb 2, 2016

@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!

0reactions
angular-automatic-lock-bot[bot]commented, Sep 8, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found