Polymer.Dart linter gives warnings about ng-view tags used by Angular.Dart

154 views Asked by At

I'm getting a Polymer warning every time I save HTML files with Angular.Dart routing logic:

[Warning from polymer (Linter) on datacea|web/datacea.html]:
line 41, column 10 of web\datacea.html: custom element with name "ng-view" not found. See      http://goo.gl/5HPeuP#polymer_11 for details.
<ng-view>
^^^^^^^^^

I've already tried adding datacea.html (this the file in question) as an entry_points item under transformers in my pubspec.yaml file. This seems to have no effect on this particular issue.

transformers:
 - angular
 - polymer:
    entry_points:
      -web/datacea.html

This doesn't affect the execution of the program, but is very annoying. Is there way to get Polymer to understand that ng-view is not a custom polymer element?

1

There are 1 answers

4
Günter Zöchbauer On BEST ANSWER

I think there aren't many good options to handle this. I didn't know Polymer checks this because it is perfectly valid to have a custom tag without it being a Polymer element (as in your example).

you can

  • ignore the warning
  • disable Polymer linter
  - polymer:
      lint: false

see also http://dartbug.com/21237#c5