Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pagination.dart selector invalid: pagination[page][total-items] #140

Open
scriptsrc opened this issue Jan 3, 2015 · 3 comments
Open

pagination.dart selector invalid: pagination[page][total-items] #140

scriptsrc opened this issue Jan 3, 2015 · 3 comments
Labels
Milestone

Comments

@scriptsrc
Copy link

https://github.com/akserg/angular.dart.ui/blob/master/lib/pagination/pagination.dart#L211

Getting this warning in my project, which uses your pagination component:

WARNING: 2015-01-02 18:11:00.002: WARNING: Failed to set up Shadow DOM shim for pagination[page][total-items].
InvalidCharacterError: The string contains invalid characters. 'pagination[page][total-items]' is not a valid attribute name.
#0      BlinkElement.setAttribute_Callback_2 (dart:_blink:7323)
#1      BlinkElement.setAttribute_Callback_2_ (dart:_blink:7324)
#2      Element.setAttribute (dart:html:13456)
#3      _ElementAttributeMap.[]= (dart:html:36506)
#4      _addAttributeToAllElements.<anonymous closure> (package:angular/core_dom/web_platform_shim.dart:80:59)
#5      Object&ListMixin.forEach (dart:collection/list.dart:63)
#6      _addAttributeToAllElements (package:angular/core_dom/web_platform_shim.dart:80:39)
#7      DefaultPlatformShim.shimShadowDom (package:angular/core_dom/web_platform_shim.dart:70:31)
#8      ShimmingViewFactoryCache._createViewFactory (package:angular/core_dom/web_platform_shim.dart:130:31)
#9      ShimmingViewFactoryCache.fromHtml (package:angular/core_dom/web_platform_shim.dart:111:70)
#10     BoundComponentFactory._viewFactoryFuture (package:angular/core_dom/shadow_dom_component_factory.dart:23:55)
#11     BoundTranscludingComponentFactory.BoundTranscludingComponentFactory (package:angular/core_dom/transcluding_component_factory.dart:51:66)
#12     TranscludingComponentFactory.bind (package:angular/core_dom/transcluding_component_factory.dart:26:11)
#13     ElementBinderBuilder.addDirective.<anonymous closure> (package:angular/core_dom/element_binder_builder.dart:84:69)
#14     BoundComponentData.factory (package:angular/core_dom/element_binder_builder.dart:134:21)
#15     ElementBinder._createDirectiveFactories (package:angular/core_dom/element_binder.dart:263:67)
#16     ElementBinder.bind (package:angular/core_dom/element_binder.dart:294:32)
#17     ViewFactory._bindTagged (package:angular/core_dom/view_factory.dart:79:36)
#18     ViewFactory._link (package:angular/core_dom/view_factory.dart:119:24)
#19     ViewFactory.call (package:angular/core_dom/view_factory.dart:58:10)
#20     BoundTranscludingComponentFactory.call.<anonymous closure>.<anonymous closure> (package:angular/core_dom/transcluding_component_factory.dart:112:54)
#21     _rootRunUnary (dart:async/zone.dart:902)
#22     _ZoneDelegate.runUnary (dart:async/zone.dart:508)
#23     _onRunUnary.<anonymous closure> (package:angular/core/zone.dart:122:63)
#24     VmTurnZone._onRunBase (package:angular/core/zone.dart:104:16)
#25     _onRunUnary (package:angular/core/zone.dart:122:17)
#26     _CustomZone.runUnary (dart:async/zone.dart:804)
#27     _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:484)
#28     _Future._propagateToListeners (dart:async/future_impl.dart:567)
#29     _Future._completeWithValue (dart:async/future_impl.dart:358)
#30     _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:412)
#31     _rootRun (dart:async/zone.dart:891)
#32     _ZoneDelegate.run (dart:async/zone.dart:501)
#33     _onScheduleMicrotask.<anonymous closure> (package:angular/core/zone.dart:127:45)
#34     RootScope._runAsyncFns (package:angular/core/scope.dart:923:25)
#35     RootScope.digest (package:angular/core/scope.dart:812:38)
#36     Scope.apply (package:angular/core/scope.dart:316:24)
#37     RootScope.RootScope.<anonymous closure> (package:angular/core/scope.dart:768:12)
#38     _rootRun (dart:async/zone.dart:895)
#39     _ZoneDelegate.run (dart:async/zone.dart:501)
#40     VmTurnZone._finishTurn (package:angular/core/zone.dart:168:21)
#41     VmTurnZone._onRunBase (package:angular/core/zone.dart:111:43)
#42     _onRunUnary (package:angular/core/zone.dart:122:17)
#43     _CustomZone.runUnary (dart:async/zone.dart:804)
#44     _CustomZone.runUnaryGuarded (dart:async/zone.dart:712)
#45     _CustomZone.bindUnaryCallback.<anonymous closure> (dart:async/zone.dart:738)
@akserg akserg added the bug label Jan 3, 2015
@akserg akserg added this to the 0.6 milestone Jan 3, 2015
@akserg
Copy link
Owner

akserg commented Jan 3, 2015

HI,

Can you please, give me a short snippet of your code to check what's wrong here.

Sergey.

@akserg
Copy link
Owner

akserg commented Feb 19, 2015

Sorry, I can't reproduce this error. You may follow recommendation from CSS Shim:

Add following statements into dart file with main method:

  • Import statement.
import 'package:angular/core_dom/module_internal.dart' 
  show DefaultPlatformShim, PlatformJsBasedShim;
  • Shim code.
@Injectable()
class DefaultPlatformNoShim implements DefaultPlatformShim {
  bool get shimRequired => true;
  String shimCss(String css, {String selector, String cssUrl}) => css;
  void shimShadowDom(dom.Element root, String selector) {}
}

@Injectable()
class PlatformJsBasedNoShim implements PlatformJsBasedShim {
  bool get shimRequired => true;
  String shimCss(String css, {String selector, String cssUrl}) => css;
  void shimShadowDom(dom.Element root, String selector) {}
}
  • In you module definition.
bind(PlatformJsBasedShim, toImplementation: PlatformJsBasedNoShim);
bind(DefaultPlatformShim, toImplementation: DefaultPlatformNoShim);

Please let me if that helps you.

@akserg
Copy link
Owner

akserg commented Feb 25, 2015

Hi,
Any feedback?

@akserg akserg modified the milestones: 0.6, 0.7 Feb 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants