1
VueコンポーネントでLaravel 5.4をテストしています。しかし、問題はビューコンポーネントがビューページに表示されないことです。ここでは、ブレードchat.blade.phpVueコンポーネントがデータをロードしていません
<html>
<head>
<title>Chat Rool</title>
<link rel="stylesheet" href="css/app.css">
</head>
<body>
<div id="app">
<h1>Chat Room</h1>
<chat-message></chat-message>
</div>
<script src="js/app.js" charset="utf-8"></script>
</body>
</html>
がここにある私のアプリです
ChatMessage.vue
<template>
<div>
<p>Message text is here</p>
<small>Author Name</small>
</div>
</template>
<script>
</script>
<style>
</style>
:
は、ここに私のVueファイルです。 js
require('./bootstrap');
Vue.component('chat-message', require('./components/ChatMessage.vue'));
const app = new Vue({
el: '#app'
});
読み込み中にエラーが発生しないapp.jsこれはビューページにあることを確認したためです。 誰も私にここに何が間違っていると提案することができますか?
@Holaあなたは、質問から溶液を除去することができます私はあなたが質問にこれを加えたのを見ます、誰かがこの質問を後で見るなら混乱します。 – Saurabh
そうです、私はすでにそれをチェックしたと思いました! 私は編集しました。 – Hola