Angular2 - Language Features Flashcards
Root of the application
AppComponent
AppComponent is the ____ of the application. It hosts the ___ ____ experience.
root, client user
Components
basic building blocks of Angular2 app
Component controls a ____ through its associated ____
view, template
_______ controls a view through its associated template
A component
@Component decorator
which template to use and how to create it
@Component contains ______ that tells which template to use and how to create the component.
metadata
@Component - Selector
specifies CSS selector for an HTML element
@Component - TemplateUrl, Template
html file/an html string
@Component - Directives
array for injecting other components
@Component - Providers
where services are registered
App.component.ts
Contains
- import statements
- @Component decorator
- component class
Component class
- “controller” that controls appearance and behavior of a view through the template
AppComponent
- AppComponent is exported, to be imported somewhere else
- located in App.component.ts
Main.ts
bootstraps the app
Main.ts - bootstrap function
- called by Angular
1) reads AppComponent (root component)
2) finds my-app selector
3) locates my-app element
4) renders the app between my-app tags
index.html
- defines the web page that hosts the app
- contains all of the script tags
SystemJS
- module loader