Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="row" id="index-list">
- <div class="row">
- <div class="collection">
- <a :href="l.link" class="collection-item" v-for="l in list.array">{{l.title}}</a>
- </div>
- </div>
- <div class="row" v-html="pagination"></div>
- </div>
- <script>
- </script>
- <script>
- var Vue_Listing = new Vue({
- el: '#index-list',
- data: {
- pagination: null,
- list: [],
- page:1,
- },
- methods:{
- getAll:function(page){
- page = page ? page : 1;
- this.$http.get(site_url(`ost/api/all?p=${page}`))
- .then(function(resp){
- console.log(resp);
- this.pagination = resp.body.links;
- this.list = resp.body;
- }, function(error){
- alert(error.statusText);
- });
- },
- try:function(){
- alert('nnna');
- return false;
- },
- },
- mounted:function(){
- this.getAll();
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement