Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Angular for .NET Developers

You're reading from   Learning Angular for .NET Developers Develop dynamic .NET web applications powered by Angular 4

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher Packt
ISBN-13 9781785884283
Length 248 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Rajesh Gunasundaram Rajesh Gunasundaram
Author Profile Icon Rajesh Gunasundaram
Rajesh Gunasundaram
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Getting Started with Angular FREE CHAPTER 2. Angular Building Blocks - Part 1 3. Angular Building Blocks - Part 2 4. Using TypeScript with Angular 5. Creating an Angular Single-Page Application in Visual Studio 6. Creating ASP.NET Core Web API Services for Angular 7. Creating an Application Using Angular, ASP.NET MVC, and Web API in Visual Studio 8. Testing Angular Applications 9. What s New in Angular and ASP.NET Core

The architecture of Angular

Before we jump onto our Hello World application on Angular, let me give you a quick overview of the Angular architecture. The architecture of Angular comprises of eight core building blocks: a module, component, template, metadata, data binding, service, directive, and dependency injection.

Architecture of Angular

An Angular application normally starts with the designing of templates with Angular tags or markups. Then, we write components to handle the templates. The application-specific logic will be added to services. Finally, the starting component or root component will be passed on to the Angular bootstrapper.

When we run the application, Angular takes the responsibility of presenting the template to the browser and takes care of user interactions with the elements in the template according to the logic provided in the components and directives.

Let's see the objective of each block of Angular in the following points:

  • Any Angular application will be comprised of a collection of components.
  • Services will be injected into components.
  • Templates are responsible for rendering the components in the form of HTML.
  • Components hold an application logic that supports the views or templates.
  • Angular itself is a collection of modules. In Angular 1, the main module or application module is bootstrapped using the ng-app directive. We can include other lists of modules that our application module or main module is dependent on; they will be defined in the empty array in angular.module('myApp', []). Angular uses ES6 modules, and the functions or variables defined in modules should be exported explicitly to be consumed in other modules. The exported functions or variables are made available in other modules using the import keyword followed by the function name and then a from keyword followed by the module name. For example, import {http} from @angular/http.
  • Each Angular library is a facade of many private modules that are logically related.
  • Directives provide instructions to render the templates.

We will see each building block of the Angular architecture in detail in the subsequent chapters.

You have been reading a chapter from
Learning Angular for .NET Developers
Published in: Jun 2017
Publisher: Packt
ISBN-13: 9781785884283
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image