Git Product home page Git Product logo

Comments (4)

imacrayon avatar imacrayon commented on June 24, 2024

Thanks for reporting this. Iā€™m close to rolling out a fix, shooting for a release at the end of this week.

from alpine-ajax.

imacrayon avatar imacrayon commented on June 24, 2024

Ah, you have a sneaky syntax error in the first code snippet, x-target is a directive so you have to drop the : prefix (just like x-text), this should work:

<template x-for="(note, index) in filenotes" :key="index">
<div>
<div :id="'note'+index"><p x-text="note.filenotes"></p></div>
<div><a :href="'filenotes-edit/'+info.profile.id" x-target="'note'+index">edit</a></div>
</div>
</template>

This won't fix everything yet, there's still an issue with dynamically evaluating x-target, but I'm working on that fix right now and the code above should work on the next release.

from alpine-ajax.

imacrayon avatar imacrayon commented on June 24, 2024

You can x-target:dynamic in v0.6.0 now:

<template x-for="(note, index) in filenotes" :key="index">
<div>
<div :id="'note'+index"><p x-text="note.filenotes"></p></div>
<div><a :href="'filenotes-edit/'+info.profile.id" x-target:dynamic="'note'+index">edit</a></div>
</div>
</template>

from alpine-ajax.

cocomansur avatar cocomansur commented on June 24, 2024

Awesome! Thanks @imacrayon

from alpine-ajax.

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.