Styles and scripts not working when change route (vue.js + laravel)

180 Views Asked by At

I have included some scripts in my blade file, but it didn't work, and the reason is that the scripts are loaded before the app.js, but I added defer attribute for tags and it seemed to work fine, but when I change to another route, the style and script stopped working.

<script src="{{asset('assets/admin/app-assets/vendors/js/forms/icheck/icheck.min.js')}}" type="text/javascript" defer></script>

Is there a solution and an explanation for this problem?

0

There are 0 best solutions below