Angular Architecture Summary
summarize this architecture :
Component
Selector : there are three ways to specify the selector.
Use it @Component HTML
as a custom HTML tag selector: 'app-test', <app-test></app-test>
as a class name selector: '.app-test2', <div class="app-test2"> </div>
as an attribute selector: '[app-test3]', <div app-test3><div>
- Anuglar apps contain one or more modules. Every angular application has at least one module which is the root module.
- Each module contains one or more components and services.A component controls a portion of the view on the browser.
- Each component contains an HTML template and a class to control the logic for that particular view. The template represents the view in the browser.
- Module can also have services which contains the business logic of your application.
- The modules export and import code as when required and finally render the view in the browser.
Component
Selector : there are three ways to specify the selector.
Use it @Component HTML
as a custom HTML tag selector: 'app-test', <app-test></app-test>
as a class name selector: '.app-test2', <div class="app-test2"> </div>
as an attribute selector: '[app-test3]', <div app-test3><div>
评论
发表评论