vue.js - Is there an issue retriving json data when using vue, axios, and laravel? -


i trying replicate tutorial on vuecasts (https://laracasts.com/series/learn-vue-2-step-by-step/episodes/18).

everything looks fine , don't errors except warning:

resource interpreted document transferred mime type application/json: "http://vueme.app:8000/skills"

i tried change content-type text/html suggested here: resource interpreted document transferred mime type application/json warning in chrome developer tools

web.php:

route::get('/', function () {     return view('welcome'); });   route::get('skills', function(){ return ['javascript', 'php', 'python']; }); 

welcome.blade.php:

<!doctype html> <html lang="{{ app()->getlocale() }}">     <head>         <meta charset="utf-8">         <title>laravel</title>     </head>     <body>          <div id="root">             <ul>                 <li v-for="skill in skills" v-text="skill"></li>             </ul>         </div>         <script scr="https://unpkg.com/axios/dist/axios.min.js"></script>         <script scr="https://unpkg.com/vue"></script>         <script scr="/js/app.js"></script>     </body> </html> 

app.js:

new vue({     el: '#root',     data:{         skills:[]     },     mounted(){         axios.get('/skills').then(response => this.skills = response.data);     } }); 

what's not working?


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -