Now that we have the component ready, we can create a new page. Pages are meant to hold up components together. Just like you would do with lego blocks. Every component is a lego block, and then your page would consist of one or more components.
php artisan ng:page create_post
Then inside the
angular/app/pages/create_post.page.html we need to call the createPostForm component.
<h1>Create Post</h1> <create-post-form></create-post-form>
This might feel repetitive, but we're actually benefiting of code reuse (for the create_post component). We can also add the relevant page title here, or even call other directives in more complex examples.
Prefer a screencast?
Updated less than a minute ago