Introduction to Components
What is a Component?
Creating the Component class
Defining the Metadata with a Decorator
Importing what we need
Bootstrapping our App Component
App
Component
Welcome
Component
Product List
Component
Product Detail
Component
Star
Component
index.html
Product Data
Service
Component
Template
Class
Metadata
Properties
Methods
npm
Node package manager
Command line utility
Installs libraries, packages and applications
https://www.npmjs.com/
Manually perform each step
www.angular.io / Quick start
Download the results of these steps
https://github.com/angular/quickstart
Angular CLI
https://github.com/angular/angular-cli
Starter files
https://github.com/firehist/angular2-courses
Augury
Angular Batscanner
Namespaces
Code organisation
Angular 1 Modules
TypeScript Modules
ES2015
Modules
Angular 2 Modules
product.ts
export class Product {
}
product.js
function Product() {
}
product-list.ts
import { Product } from
'./product'
Component
Root
Angular Module
Component
Component
Component
Feature
Angular Module
Component
Component
Component
Component
Shared
Angular Module
Component
ES Modules
Code files that import or export something
Organize our code files
Modularize our code
Promote code reuse
Angular Modules
Code files that organize the application into blocks of functionality
Organize our application
Modularize our application
Promote application boundaries
Web Browser
Web Server
URL Request (mysite.com)
Response
index.html
JavaScript
Selecting a Language
Selecting an Editor
Setting up an Angular 2 Application
About Modules
App
Component
Welcome
Component
User List
Component
User Detail
Component
Star
Component
index.html
User Data
Service