Sha256: aa78dd72d6cd35b0a9e6ce946023a8edcb47df9d5c07f8c8744aba7e2d3f0a27
Contents?: true
Size: 1.19 KB
Versions: 2
Compression:
Stored size: 1.19 KB
Contents
import ApplicationController from './application_controller' /* This is the custom StimulusReflex controller for <%= @name.classify %>Reflex. * Learn more at: https://docs.stimulusreflex.com */ export default class extends ApplicationController { /* Reflex specific lifecycle methods. * Use methods similar to this example to handle lifecycle concerns for a specific Reflex method. * Using the lifecycle is optional, so feel free to delete these stubs if you don't need them. * * Example: * * <a href="#" data-reflex="<%= @name.classify %>Reflex#example">Example</a> * * Arguments: * * element - the element that triggered the reflex * may be different than the Stimulus controller's this.element * * reflex - the name of the reflex e.g. "<%= @name.classify %>Reflex#example" * * error - error message from the server */ // beforeUpdate(element, reflex) { // element.innerText = 'Updating...' // } // updateSuccess(element, reflex) { // element.innerText = 'Updated Successfully.' // } // updateError(element, reflex, error) { // console.error('updateError', error); // element.innerText = 'Updated Failed!' // } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
stimulus_reflex-2.1.4 | lib/generators/templates/custom_controller.js |
stimulus_reflex-2.1.3 | lib/generators/templates/custom_controller.js |