Question

I have simple template with tabs which are switching controlers in template

<ul>
    <li><a href="#" ng-click="tab = 1">Users</a></li>
    <li><a href="#" ng-click="tab = 2">Games</a></li>
</ul>

<div class="tab" ng-hide="tab != 1 && tab != null" users>...</div>
<div class="tab" ng-hide="tab != 2" games>...</div>

Everything work as expected, but in new update of dart editor variable "tab" is marked as "undefined name 'tab'"

Is it bug or i should initalize tab variable in some place (where?)

Was it helpful?

Solution

AFAIK this is just the DartEditor not recognizing Angular expressions. If it's just the underline and no exceptions or similar you can ignore it.

Maybe DartEditor is checking for Polymer-specific declarations here. Better Angular support in DartEditor is work in progress.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top