2017-12-23 28 views
0

Vue.jsのテンプレートがblade.phpに表示されないため、問題があります。私はこのチュートリアルhttps://www.itechempires.com/2017/10/laravel-5-5-vuejs-2-0-crud-operations-application/から一歩一歩一歩進んだが、うまくいかない。Laravel 5.5とVue.jsにテンプレートが表示されない

マイコード:

Roster.vue

<template> 
    <div class="container"> 
     <div class="row"> 
      <div class="col-md-12"> 
       <div class="panel panel-default"> 
        <div class="panel-heading">Roster</div> 

        <div class="panel-body"> 

        </div> 
       </div> 
      </div> 
     </div> 
    </div> 
</template> 

<script> 
    export default { 
     mounted() { 

     } 
    } 
</script> 

app.js

/** 
* First we will load all of this project's JavaScript dependencies which 
* includes Vue and other libraries. It is a great starting point when 
* building robust, powerful web applications using Vue and Laravel. 
*/ 

require('./bootstrap'); 

window.Vue = require('vue'); 

/** 
* Next, we will create a fresh Vue application instance and attach it to 
* the page. Then, you may begin adding components to this application 
* or customize the JavaScript scaffolding to fit your unique needs. 
*/ 

Vue.component('example-component', require('./components/ExampleComponent.vue')); 
Vue.component('roster', require('./components/Roster.vue')); 

const app = new Vue({ 
    el: '#app' 
}); 

選手ブレード:

@extends('layouts.admin.dashboard') 


@section('content') 


<task></task> 

@endsection 

私は一気の時計を走っていないし、まだ何も。

------------編集:問題の問題のため ソリューションが行方不明になった<div id="app"> </div>

+0

開発者コンソールを開き、そこでエラーをチェックします。 –

+0

@u_mulder Vueが検出されないなぜ – tomczas

+3

コンポーネントが登録されているので、ブレードに ' ' – nemesv

答えて

0

ソリューションは、ブレード・ファイル内の <div id="app"> </div>

<script src="{{ mix('js/app.js') }}"></script> 

がありませんでした。

関連する問題