Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

stimulus params

<div data-controller="item spinner">
  <button data-action="item#upvote spinner#start" 
    data-item-id-param="12345" 
    data-item-url-param="/votes"
    data-item-payload-param='{"value":"1234567"}' 
    data-item-active-param="true">…</button>
</div>
Comment

stimulus params

// ItemController
upvote(event) {
  // { id: 12345, url: "/votes", active: true, payload: { value: 1234567 } }
  console.log(event.params) 
}

// SpinnerController
start(event) {
  // {}
  console.log(event.params) 
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: supertest expect content type 
Javascript :: react native stack transition from right to left 
Javascript :: You might have more than one copy of React in the same app. 
Javascript :: using dot prototype with constructor in javascript 
Javascript :: array con doble javascript 
Javascript :: send message to user facebook game 
Javascript :: postDataToFirebase 
Javascript :: js confirm 
Javascript :: The JavaScript Apply() Function 
Javascript :: filter the falsy values out of an array in a very simple way! 
Javascript :: e.target.id not working react js 
Javascript :: change the origin of html canvas 
Javascript :: how to check url with port is valid or not regex javascript 
Javascript :: how to create a blob javascript 
Javascript :: javascript iterable 
Javascript :: javascript null Conversion to Number 
Javascript :: nuxt history back 
Javascript :: empty array js 
Javascript :: full form of json 
Javascript :: js retry function if error 
Javascript :: adobe target triggerview 
Javascript :: npm jwt decode 
Javascript :: check if browser is online 
Javascript :: Open props 
Javascript :: ternary 
Javascript :: back button not working when modal open in react native 
Javascript :: includes in javascript 
Javascript :: javascript break inner loop 
Javascript :: javascript switch statement 
Javascript :: Symbol Methods javascript 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =