Coder Social home page Coder Social logo

.sync modifier about ngvue HOT 2 CLOSED

ngvue avatar ngvue commented on July 1, 2024
.sync modifier

from ngvue.

Comments (2)

jaredmcateer avatar jaredmcateer commented on July 1, 2024

Hi @itomtom, modifiers are not supported as far as I can tell*, currently you'd have to write the binding using the prop/emit method. I'd be happy to accept a PR if you're willing to work on it though.

It seems like events with colons don't work I did a test using the example server where I modified updateFirstName in index.js to emit new-first-name:test and then in the index.html I modified the angular directive to use v-on-new-first-name:test and clicking the button nothing happens.

* Disclaimer: I'm currently trying to maintain this package but I am not an expert on its code base yet, I'm just another person trying to migrate our legacy angular app to Vue.

from ngvue.

jaredmcateer avatar jaredmcateer commented on July 1, 2024

I know this is quite late but in trying to figure out Composition API support I was also looking at the code to see if this is something I could add support for and realized that angular normalizes attributes

e.g.,
v-on-foo:bar
v-on-foo_bar
v-on-fooBar

all get normalized to vOnFooBar, which makes it problematic to support colon separated events.

Vue 3 has also dropped .sync and reworked v-model to support 2 way bindings. I think if someone were to implement this in ngVue it would be to emulate Vue 3's style by adding a v-model-<propName>="<boundData>"

from ngvue.

Related Issues (20)

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.