Advertisement
Guest User

Untitled

a guest
Oct 20th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. Vue.component('feedback-table', {
  2. template: '#grid-template',
  3. data: function () {
  4. return {
  5. test:[],
  6. teste:'a'
  7. }
  8. },
  9. created:function(){
  10. $.getJSON('/getFeedbackQuestionsAndChances',function(data){
  11. this.test = data.chancesOfApproval;
  12. }.bind(this));
  13. },
  14.  
  15.  
  16. });
  17. new Vue({
  18. el: '#feedback-wrapper',
  19. });
  20.  
  21. <div id="feedback-wrapper">
  22. <feedback-table></feedback-table>
  23. </div>
  24. <template id="grid-template">
  25. <div>
  26. <h1>teste</h1>
  27. <h1>@{{ teste }}</h1>
  28. <div class="table table-bordered table-responsive table-striped">
  29. <div v-for="entry in test">
  30. @{{ entry }}
  31. </div>
  32. </div>
  33. </div>
  34. </template>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement