tag:blogger.com,1999:blog-581197352358126527.post8521399684431027049..comments2024-03-29T03:21:30.339-07:00Comments on japh(r) by Chris Strom: Day 1,001: Getting Started with Angular and Polymer (Dart)Anonymoushttp://www.blogger.com/profile/00135361916531185929noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-581197352358126527.post-34857705316495525402014-01-22T11:45:11.616-08:002014-01-22T11:45:11.616-08:00I was going to look into this anyway, so I think y...I was going to look into this anyway, so I think you're helping me eliminate some work so that I can focus elsewhere. So thanks!Anonymoushttps://www.blogger.com/profile/00135361916531185929noreply@blogger.comtag:blogger.com,1999:blog-581197352358126527.post-27347704479357164442014-01-22T11:40:16.192-08:002014-01-22T11:40:16.192-08:00If anything it will have at least eliminated one p...If anything it will have at least eliminated one possibility a bit more quickly for you, or put you on a side track :-)Jameshttps://www.blogger.com/profile/02075826729346305568noreply@blogger.comtag:blogger.com,1999:blog-581197352358126527.post-80892343737896651532014-01-22T10:01:14.117-08:002014-01-22T10:01:14.117-08:00Yikes. That seems pretty involved. I may give it a...Yikes. That seems pretty involved. I may give it a go in JavaScript first and use that to compare with your experiences. What you describe sounds doable, but maybe not something for “Patterns.”Anonymoushttps://www.blogger.com/profile/00135361916531185929noreply@blogger.comtag:blogger.com,1999:blog-581197352358126527.post-24626545607736177762014-01-20T23:30:45.207-08:002014-01-20T23:30:45.207-08:00Well I managed to get routes to work too, using a ...Well I managed to get routes to work too, using a mutation observer on <ng-view> to get the list of AnchorElements and create a proxy AnchorElement in the main document, activating the proxies click event whenever the AnchorElements are clicked in the Polymer Element. I'm not sure this is the best thing to do, but it works. I think there a whole lot of issues due to Polymer Elements shadowRoot hiding things. Angular, and the third party libraries it uses, relies on elements being searchable in the main document. It doesn't deal with the shadow root at all, thus, I think, current solutions for Angular within Polymer will have to involve some sort of proxy, as one solution. Oh and did I mention any events from Anchorelements within the Polymer element look to Angular as if they are created by the Polymer Element. route_hierarchical intercepts click events on the window and checks to see which element they are from before deciding what to do. It is looking for AnchorElements as the source of the event before it'll invoke the route.Jameshttps://www.blogger.com/profile/02075826729346305568noreply@blogger.comtag:blogger.com,1999:blog-581197352358126527.post-11048142445014073132014-01-20T21:13:27.248-08:002014-01-20T21:13:27.248-08:00Cool! You're getting ahead of me. Good to know...Cool! You're getting ahead of me. Good to know that it can be done :)Anonymoushttps://www.blogger.com/profile/00135361916531185929noreply@blogger.comtag:blogger.com,1999:blog-581197352358126527.post-32557600534650947902014-01-20T03:56:38.570-08:002014-01-20T03:56:38.570-08:00I forgot to mention I did the ngBootstrap(...) in ...I forgot to mention I did the ngBootstrap(...) in created(). It also works in enteredView()Jameshttps://www.blogger.com/profile/02075826729346305568noreply@blogger.comtag:blogger.com,1999:blog-581197352358126527.post-11839412240383604612014-01-20T03:54:42.486-08:002014-01-20T03:54:42.486-08:00Inspired by this post, I tried a different route, ...Inspired by this post, I tried a different route, of using Angular Dart directly inside a Polymer element. What this means is that you set this up as a regular polymer dart application, and include the directives inside the code for the Polymer element you create. I managed it with something similar to what you have, minus the pizza part. The trick is to include the element parameter in<br /><br />ngBootstrap(module: store, element: $['entry']);<br /><br />with entry being<br /><br /><div id="entry"><br /> <ng-view></ng-view><br /></div><br /><br />The only downside is routes don't seem to work for me in the same way as they do for you. I had to create a route with a path of '/index.html#/pizza/custom' before it would work.<br /><br />The upside is it can be done, with work arounds. At least for routes anyway. I also left the Tranformer in pubspec.yaml alone.Jameshttps://www.blogger.com/profile/02075826729346305568noreply@blogger.com