Angular study notes: foundation

What Angular that the definition of the official website is: Angular is a platform that makes it easy to build applications with the definition of Angular of the web official website is a platform that makes it very easy to build a web application.

Official website there is another passage: This documentation assumes that you are already familiar with JavaScript, and some of the tools from the latest standards such as classes and modules The code samples are written using TypeScript Most Angular code can be written with just the.. latest JavaScript, using types for dependency injection, and using decorators for metadata. Angular effect that writing is based on a document prepared by the pre-conditions, the pre-condition that you are familiar with JavaScript, including some very new standards, for example, classes and packages, Angular core examples are written with TypeScript, most of the core Angular are written in JavaScript with the latest, with the dependency injection type, modified metadata with the decorator. Meaning of this passage is to learn the latest ECMAScript 6, then learn TypeScript, but also to understand some of the concepts such as dependency injection, decorator. Angular also use the package manager npm Nodejs in, so it is best to learn about Nodejs. In short things to learn or find many.

Key concept

Angular three core concepts: the Component Component  Module Module  Route Route

Project structure

The official scaffolding (Angular CLI) to quickly build a project, the project directory as follows:

 Which projects mainly in src, src directory structure is as follows:

 

A component consists of three files: namely: html template files, css style files private components, components of the core document (ts written), (usually there will be spec.ts test file)

 

 

supplement:

Angular route and the role of both differ Express route, the main route Angular dealing with user interaction, and mainly deal with Express users access Restful api 

Reproduced in: https: //www.cnblogs.com/colin220/p/9315229.html

Guess you like

Origin blog.csdn.net/weixin_34050427/article/details/93449808