Guest User

Untitled

a guest
Mar 24th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import { Controller } from "stimulus";
  2.  
  3. export default class extends Controller {
  4. static targets = ["message", "commentList"]
  5.  
  6. onPostSuccess(event) {
  7. let [data, status, xhr] = event.detail;
  8. this.commentListTarget.innerHTML += xhr.response;
  9. this.messageTarget.value = "";
  10. }
  11. }
Add Comment
Please, Sign In to add comment