December 2017
Beginner to intermediate
376 pages
7h 53m
English
Now the mount element in our main template will be empty. We need to declare the Listing component, but we don't want to do it in the view.
resources/views/app.blade.php:
<body> <div id="toolbar"> <img class="icon" src="{{ asset('images/logo.png') }}"> <h1>vuebnb</h1> </div> <div id="app"> <listing></listing> </div> <script src="{{ asset('js/app.js') }}"></script> </body>
If we do it like that, we wouldn't fully eliminate all string and DOM templates from our app, so we'll keep the mount element empty.
resources/views/app.blade.php:
... <div id="app"></div> ...
We can now declare Listing with a render function inside our root instance.
resources/assets/js/app.js:
import "core-js/fn/object/assign" ...
Read now
Unlock full access