Angular Page

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/ we need to call the createPostForm component.

<h1>Create Post</h1>


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?

Did this page help you?