This repository has been archived by the owner on Feb 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 248
Add ability to generate absolute urls when referencing templates and css files #1599
Labels
Comments
@chirayuk can you please update with more information on URLs and routing in 1.x? |
TedSander
pushed a commit
to TedSander/angular.dart
that referenced
this issue
Jan 18, 2015
… relative Makes resolved URLs absolute instead of relative. With this determination of URLs is not relative to the current browser path, which was one of the problems this code is trying to solve. Closes dart-archive#1599
TedSander
pushed a commit
to TedSander/angular.dart
that referenced
this issue
Jan 18, 2015
… relative Makes resolved URLs absolute instead of relative. With this determination of URLs is not relative to the current browser path, which was one of the problems this code is trying to solve. Closes dart-archive#1599
TedSander
pushed a commit
to TedSander/angular.dart
that referenced
this issue
Jan 18, 2015
Makes resolved type URLs absolute instead of relative. When they are relative it is difficult to reuse components. Using pub serve relative URLs are resolved because pub does some magic to allow add symlinks to the packages directory where needed. In production relative URLs make it difficult to add file handlers to the locations that are needed, as the location will be determined based on the current browser path or route. It also makes the template cache harder to populate because the same resource may need to be served from two separate URLs. Closes dart-archive#1599
rkirov
pushed a commit
that referenced
this issue
Jan 28, 2015
Makes resolved type URLs absolute instead of relative. When they are relative it is difficult to reuse components. Using pub serve relative URLs are resolved because pub does some magic to allow add symlinks to the packages directory where needed. In production relative URLs make it difficult to add file handlers to the locations that are needed, as the location will be determined based on the current browser path or route. It also makes the template cache harder to populate because the same resource may need to be served from two separate URLs. Closes #1599
rkirov
pushed a commit
that referenced
this issue
Jan 28, 2015
Makes resolved type URLs absolute instead of relative. When they are relative it is difficult to reuse components. Using pub serve relative URLs are resolved because pub does some magic to allow add symlinks to the packages directory where needed. In production relative URLs make it difficult to add file handlers to the locations that are needed, as the location will be determined based on the current browser path or route. It also makes the template cache harder to populate because the same resource may need to be served from two separate URLs. Closes #1599
TedSander
pushed a commit
to TedSander/angular.dart
that referenced
this issue
Jan 30, 2015
Makes resolved type URLs absolute instead of relative. When they are relative it is difficult to reuse components. Using pub serve relative URLs are resolved because pub does some magic to allow add symlinks to the packages directory where needed. In production relative URLs make it difficult to add file handlers to the locations that are needed, as the location will be determined based on the current browser path or route. It also makes the template cache harder to populate because the same resource may need to be served from two separate URLs. Closes dart-archive#1599
rkirov
pushed a commit
that referenced
this issue
Feb 2, 2015
Makes resolved type URLs absolute instead of relative. When they are relative it is difficult to reuse components. Using pub serve relative URLs are resolved because pub does some magic to allow add symlinks to the packages directory where needed. In production relative URLs make it difficult to add file handlers to the locations that are needed, as the location will be determined based on the current browser path or route. It also makes the template cache harder to populate because the same resource may need to be served from two separate URLs. Closes #1599
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Suppose I have a following project structure:
My
comp1.dart
look like:After
pub build
transformer will generatepackages/myproject/components/comp1/comp1.html
link forcomp1.html
and the same link but with different extension forcomp1.css
.And it works perfectly until your site does not use routes. When you begin to use routes browser tries to download files like this
http://myproject.local/about_us/packages/myproject/components/comp1/comp1.html
for urlhttp://myproject.local/about_us/
. It's totally wrong.Why relative urls sucks:
pub serve
handles such madness but it's not intended for production. We use something more powerful, e.g. nginx.In my opinion we need an option to generate absolute urls. It might be
on
by default at least for build.The text was updated successfully, but these errors were encountered: