fix(ComponentUrlMapper): support relative template URLs in Dartium

When running in Dartium without using transformers (i.e. with a normal
static web server), handle relative template URLs. This works by using
mirrors to get the URL of the library where the component class is
defined.

Closes #2771

Closes #3743
This commit is contained in:
Tim Blasi
2015-08-19 16:56:46 -07:00
committed by Timothy Blasi
parent 42e1b07705
commit 7c7888de4f
8 changed files with 36 additions and 4 deletions

View File

@ -10,9 +10,7 @@ class NullReflectionCapabilities implements ReflectionCapabilities {
_notImplemented(String name) => throw 'Not implemented: $name';
bool isReflectionEnabled() {
return false;
}
bool isReflectionEnabled() => false;
Function factory(Type type) => _notImplemented("factory");
@ -27,6 +25,8 @@ class NullReflectionCapabilities implements ReflectionCapabilities {
SetterFn setter(String name) => _nullSetter;
MethodFn method(String name) => _nullMethod;
String importUri(Type type) => './';
}
_nullGetter(Object p) => null;