vendredi 4 août 2017

How to write Vue js code in separate file and include in laravel

Please suggest me in this. How to write Vue js code in separate file and include in laravel Blade page code,

How do i write code in separate js file.

Am also using gulp file.

@section('js')
<script>
   new Vue({

        // Defining a element.
        el: '#branddashboard-html',

        data: {

            // Defining data variable.
            brandStats: null
        },

        // On load functionality.
        created: function () {

            // Initializing method.
            this.getData();

        },


        },

        // Methods to implement.
        methods: {

            getData: function () {

                self.brandStats = null;

                $.get('brand-stats/' + userId + '/' + period, function (data) {
                    self.brandStats = data;

                });
            }
        }
    });
</script>
 @endsection



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2v340Xr
via IFTTT

Aucun commentaire:

Enregistrer un commentaire