Comments (4)
Unfortunately I haven't been able to figure out how to modify the template before it hits the page. This means we likely need to use a custom syntax for doing Angular -> Polymer bindings :(
from angular-custom-elements.
We have tested out multiple approaches for fixing this, but have been unable to find a way to change this before polymer kicks in.
If you defer the loading of polymer this only fixes it on first load, not when you load the next page.
My best solution so far has been to use ng-attr-*
, where angular will set the attribute itself, and the collision is solved unless you also use ngAttr*
as a prop in your element 😛
I then use my own directive similar to this, but with double binding support for ng-attr
.
It's not perfect, but you don't need to do
if (/\{\{.+\}\}/.test(val)) { return; }
or similar in your computed's which is way worse.
(^for a String
property. for Object
/Array
you need to test for null after the failed parse)
from angular-custom-elements.
yeah I've thought about recommending ng-attr-*. It's kind of a bummer because then you're serializing everything to strings and then parsing them again in Polymer. But it might be the only way around the issue
from angular-custom-elements.
yeah it isn't ideal, but angular 1.x and polymer isn't that great of a match unfortunately.
from angular-custom-elements.
Related Issues (13)
- Test ngShow/ngHide
- Write a test using ng-model
- Write a test using ng-if
- Write a test using transclusion
- Write a test using UI-router
- Commonjs support HOT 2
- Don't rely on violating Shadow DOM in tests
- Angular bindings misunderstanding. HOT 2
- bind-value-to with custom elements v.1 HOT 2
- one-way bindings current only work in Chrome (Polymer bug) HOT 3
- Test ng-if HOT 1
- Multiple elements in the same scope
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-custom-elements.