Book Image

Hands-On Full Stack Web Development with Angular 6 and Laravel 5

By : Fernando Monteiro
Book Image

Hands-On Full Stack Web Development with Angular 6 and Laravel 5

By: Fernando Monteiro

Overview of this book

Angular, considered as one of the most popular and powerful frontend frameworks, has undergone a major overhaul to embrace emerging web technologies so that developers can build cutting-edge web applications. This book gives you practical knowledge of building modern full-stack web apps from scratch using Angular with a Laravel Restful back end. The book begins with a thorough introduction to Laravel and Angular and its core concepts like custom errors messages, components, routers, and Angular-cli, with each concept being explained first, and then put into practice in the case-study project. With the basics covered, you will learn how sophisticated UI features can be added using NgBootstrao and a component-based architecture. You will learn to extend and customize variables from Bootstrap CSS framework. You will learn how to create secure web application with Angular and Laravel using token based authentication. Finally, you will learn all about progressive web applications and build and deploy a complete fullstack application using Docker and Docker-compose. By the end of this book, you'll gain a solid understanding of Angular 6 and how it interacts with a Laravel 5.x backend
Table of Contents (13 chapters)

Adding components to our application

Now, we are going to continue to add some more components to our application. We must remember that, in the application summary, we defined a page for the bikes list that refers to the api/bikes endpoint of our API; also, we will have a bike details page that refers to the api/bikes/id endpoint, containing the details of the selected bike. And, we will do the same to the api/builders endpoint.

So, let's start creating the components:

  1. Open your Terminal window inside ./Client/src/app, and type the following command:

 ng g c pages/bikes/bike-detail

At the end of the previous command, you will see the following structure, inside the bikes modules:

Bikes module structure

The preceding command will create a root bikes folder to store every module related to the bikes endpoint; this pattern allows us to have a modular application, where...