angular.dart
angular.dart copied to clipboard
Travis failing: linked to support for relative URLs ?
There is a Travis failure that seems to be linked to the recent PRs about resolving relative URLs.
Please not that the test pass even if a 404 is returned. Is this expected ?
@dsalsbury @chirayuk could you please take a look at this ?
Also note those analyzer warnings:
Building angular_dart_example...
[Warning from _Serial on angular_dart_example|web/form.dart]:
line 5, column 1 of web/form.dart: Unable to find form_controller.html at angular_dart_example|form_controller.html
@Component(
^^^^^^^^^^^
[Warning from _Serial on angular_dart_example|web/bouncing_balls.dart]:
line 31, column 1 of web/bouncing_balls.dart: Unable to find bouncing_controller.html at angular_dart_example|bouncing_controller.html
@Component(
^^^^^^^^^^^
The failures seem to be linked to access body then I suspect the following code:
HtmlDocument document = new DomParser().parseFromString(
"<!doctype html><html><body>$html</body></html>", "text/html");
I someone with a a Mac and Safari could take a look, it would really help, Thanks.
Edit: the reported error is "NullError: Cannot call "get$body" on null"
@vicb: For the 404, that is expected. It's because we're using an img tag for the test and the browsers aggressively request the resource right away. We only care about the resolved URL so it's ok if the image doesn't exist. Perhaps we could stick in a 0 byte image there to get rid of the error.
For the NullError – this is a new one. I'll take a look.
@vicb: It turns out that Safari's DOMParser does not parse HTML (but does parse XML, etc.) It seems to be the only mainstream desktop browser that can't do this. I'm working on a fix.
@chirayuk thanks for the fix
@chirayuk re-opening this, the analyzer warnings are not fixed (see the first comment after the headline). This force us to have html files listed in the pubspec
This should be resolved by the fix in https://github.com/angular/angular.dart/issues/1455 when done.