Coder Social home page Coder Social logo

Comments (4)

robdodson avatar robdodson commented on August 27, 2024

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.

kasperstorgaard avatar kasperstorgaard commented on August 27, 2024

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.

robdodson avatar robdodson commented on August 27, 2024

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.

kasperstorgaard avatar kasperstorgaard commented on August 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.