Skip to content

x-for for CSP build #2724

Mar 4, 2022 · 3 comments · 7 replies
Discussion options

You must be logged in to vote

I just found a workaround for anybody having this same issue. Hopefully the CSP plugin will be updated to fix these sorts of issues in the future, but here's the workaround:

  <template x-for="item in items">
      <h1 x-text="getItemTitle"></h1>
  </template>

Then in getItemTitle I just access the item object via this.$data.item.title.

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@SimoTod
Comment options

@MichaelMackus
Comment options

@SimoTod
Comment options

@SimoTod
Comment options

@MichaelMackus
Comment options

Answer selected by MichaelMackus
Comment options

You must be logged in to vote
1 reply
@delete-all
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants