Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

ng-style not work after build #993

Closed
MiguelAngelLV opened this issue May 2, 2014 · 0 comments
Closed

ng-style not work after build #993

MiguelAngelLV opened this issue May 2, 2014 · 0 comments

Comments

@MiguelAngelLV
Copy link

I have that code:

 <div class="caption" ng-repeat="caption in cap.captions"
         ng-class="{active : caption == cap.temporal}"
         ng-show="caption.visible"
         ng-style="{'top': caption.y, 'left': caption.x}" >
           #{{caption.number}} - {{caption.author}}                  
</div>

Works fine direct from Dart Editor, but after build, fail in Dart and JS

No getter for 'y'.

STACKTRACE:
#0      StaticClosureMap.lookupGetter (package:angular/core/parser/parser_static.dart:15:25)
#1      DynamicParserBackend.newAccessMember (package:angular/core/parser/dynamic_parser.dart:116:43)
#2      DynamicParserImpl.parseAccessOrCallMember (package:angular/core/parser/dynamic_parser_impl.dart:202:43)
#3      DynamicParserImpl.parsePrefix (package:angular/core/parser/dynamic_parser_impl.dart:188:37)
#4      DynamicParserImpl.parseMultiplicative (package:angular/core/parser/dynamic_parser_impl.dart:163:29)
#5      DynamicParserImpl.parseAdditive (package:angular/core/parser/dynamic_parser_impl.dart:149:37)
#6      DynamicParserImpl.parseRelational (package:angular/core/parser/dynamic_parser_impl.dart:131:31)
#7      DynamicParserImpl.parseEquality (package:angular/core/parser/dynamic_parser_impl.dart:117:33)
#8      DynamicParserImpl.parseLogicalAnd (package:angular/core/parser/dynamic_parser_impl.dart:108:31)
#9      DynamicParserImpl.parseLogicalOr (package:angular/core/parser/dynamic_parser_impl.dart:99:33)
#10     DynamicParserImpl.parseConditional (package:angular/core/parser/dynamic_parser_impl.dart:83:32)
#11     DynamicParserImpl.parseExpression (package:angular/core/parser/dynamic_parser_impl.dart:68:34)
#12     DynamicParserImpl.parseObject (package:angular/core/parser/dynamic_parser_impl.dart:272:35)
#13     DynamicParserImpl.parsePrimary (package:angular/core/parser/dynamic_parser_impl.dart:237:25)
#14     DynamicParserImpl.parseAccessOrCallMember (package:angular/core/parser/dynamic_parser_impl.dart:193:30)
#15     DynamicParserImpl.parsePrefix (package:angular/core/parser/dynamic_parser_impl.dart:188:37)
#16     DynamicParserImpl.parseMultiplicative (package:angular/core/parser/dynamic_parser_impl.dart:163:29)
#17     DynamicParserImpl.parseAdditive (package:angular/core/parser/dynamic_parser_impl.dart:149:37)
#18     DynamicParserImpl.parseRelational (package:angular/core/parser/dynamic_parser_impl.dart:131:31)
#19     DynamicParserImpl.parseEquality (package:angular/core/parser/dynamic_parser_impl.dart:117:33)
#20     DynamicParserImpl.parseLogicalAnd (package:angular/core/parser/dynamic_parser_impl.dart:108:31)
#21     DynamicParserImpl.parseLogicalOr (package:angular/core/parser/dynamic_parser_impl.dart:99:33)
#22     DynamicParserImpl.parseConditional (package:angular/core/parser/dynamic_parser_impl.dart:83:32)
#23     DynamicParserImpl.parseExpression (package:angular/core/parser/dynamic_parser_impl.dart:68:34)
#24     DynamicParserImpl.parseFilter (package:angular/core/parser/dynamic_parser_impl.dart:53:33)
#25     DynamicParserImpl.parseChain (package:angular/core/parser/dynamic_parser_impl.dart:35:29)
#26     DynamicParser._parse (package:angular/core/parser/dynamic_parser.dart:36:46)
#27     DynamicParser.call.<anonymous closure> (package:angular/core/parser/dynamic_parser.dart:31:50)
#28     _HashMap.putIfAbsent (dart:collection-patch/collection_patch.dart:124)
#29     DynamicParser.call (package:angular/core/parser/dynamic_parser.dart:31:30)
#30     _AstParser.call (package:angular/core/scope.dart:973:24)
#31     _AstParser.call (package:angular/core/scope.dart:975:7)
#32     _AstParser.call (package:angular/core/scope.dart:975:7)
#33     Scope.watch (package:angular/core/scope.dart:227:35)
#34     NgStyle.styleExpression= (package:angular/directive/ng_style.dart:30:26)

Works with:

<div class="captions ng-cloak">
   <div class="caption" ng-repeat="caption in cap.captions"
            ng-class="{active : caption == cap.temporal}"
           ng-show="caption.visible"
          style="top:{{caption.y}}; left:{{caption.x}}">    
         #{{caption.number}} - {{caption.author}}             
</div>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant