- Hands-On Full Stack Web Development with Angular 6 and Laravel 5
- Fernando Monteiro
- 197字
- 2021-07-23 19:18:52
Angular's main building blocks
Every application created using the Angular framework has five very important points that connect to each other and establish the basic architecture of the application:
- Modules: Using the decorator @NgModule
- Services: Using the decorator @Injectable
- Components: Using the decorator @component
- Templates: Views with data-bind and directives
- Routes: Setting URL path to views
Let's look at a simple blog page as an Angular application, built with components:

The preceding diagram illustrates how components can be used to build a simple application.
A comparison between the preceding diagram and the five basic concepts of an Angular application would look as follows:
- One module: blog.module.ts
- A page component: blog.component.ts
- A route to the blog page
- A service to load the blog posts
There are also some additional components, such as Header, Post, and Pagination.
Note that the Header component belongs to the main module of the application (in this case, the AppModule), and the Post and Pagination components are part of the BlogModule.
As we move through this chapter, we will look more closely at the relationship between modules and components. Now, we will look at the life cycle of a component.
- 社交網(wǎng)絡(luò)對齊
- Modern JavaScript Web Development Cookbook
- 物聯(lián)網(wǎng)安全(原書第2版)
- Spring Boot 2.0 Projects
- 網(wǎng)絡(luò)故障現(xiàn)場處理實(shí)踐(第4版)
- SD-WAN架構(gòu)與技術(shù)(第2版)
- 數(shù)字通信同步技術(shù)的MATLAB與FPGA實(shí)現(xiàn):Altera/Verilog版(第2版)
- 電力物聯(lián)網(wǎng)工程技術(shù)原理與應(yīng)用
- Learning Swift(Second Edition)
- Microservice Patterns and Best Practices
- 搶占下一個(gè)智能風(fēng)口:移動(dòng)物聯(lián)網(wǎng)
- 6G:面向2030年的移動(dòng)通信
- 深入理解Nginx:模塊開發(fā)與架構(gòu)解析
- AWS Lambda Quick Start Guide
- Building RESTful Web Services with .NET Core