Angular IO Overview
The presenter introduces foundational Angular IO concepts like components, TypeScript, and the Angular CLI tool. Angular IO is a component-based framework for building single page applications. It uses TypeScript for strong typing. Components couple custom HTML elements to functionality. The Angular CLI helps generate and build Angular applications.
Http Service will help us fetch external data, post to it, etc. We need to import the http module to make use of the http service. Let us consider an example to understand how to make use of the http service.
Introduction to angular with a simple but complete project
Angular is a framework for building client applications in HTML, CSS and TypeScript. It provides best practices like modularity, separation of concerns and testability for client-side development. The document discusses creating an Angular project, generating components, binding data, using directives, communicating with backend services, routing between components and building for production. Key steps include generating components, services and modules, binding data, calling REST APIs, defining routes and building the app.
This document outlines an AngularJS certification training agenda that covers directives. It defines directives as classes that extend HTML and transform the DOM. There are three types of directives: components, structural directives, and attribute directives. Built-in directives like NgFor and NgIf are covered, which add and remove elements. The document demonstrates how to create a custom attribute directive by using the @Directive decorator and accessing native DOM elements.
Angular is a platform for building applications with templates, dependency injection, and integrated tools. It contains modules, components, directives, routing, and services as building blocks. Modules contain routes, components, directives, and services. Components form part of the DOM tree. Directives attach behavior to DOM elements. Routing enables navigation between views. Services provide business logic and data access. The Angular CLI is used to generate, develop, and maintain Angular applications.
This document provides an overview of Angular, including:
- Angular is a JavaScript framework used to build client-side applications with HTML. Code is written in TypeScript which compiles to JavaScript.
- Angular enhances HTML with directives, data binding, and dependency injection. It follows an MVC architecture internally.
- Components are the basic building blocks of Angular applications. Modules contain components and services. Services contain reusable business logic.
- The document discusses Angular concepts like modules, components, data binding, services, routing and forms. It provides examples of creating a sample login/welcome application in Angular.
Webstack Academy is a new age IT finishing school offering best in class courses in Web and Application development. Our FullStack development courses (mainly based on MEAN stack) provides excellent hands-on approach to enable you get started with your first job. It also maintains a very good balance with foundations so that your learning is complete. Here is a presentation which talks about WSA.
This document discusses Angular components, dependency injection, and routing. It defines Angular as being built on modules, components, templates, and services. Components are the basic building blocks and make up a hierarchical tree structure. Dependency injection allows components to access services. Routing in Angular uses a router to navigate between views and components based on URL changes.
Angular is an open-source TypeScript-based front-end web application platform maintained by Google. It uses MVC and dependency injection patterns. Key features include components, services, routing and calling remote services. Version 1 was released in 2009 as AngularJS and the latest version is Angular 5. It is used to build large web applications and sites like Google and Uber.
A directive is a custom HTML element that is used to extend the power of HTML. Angular 2 has the following directives that get called as part of the BrowserModule module.
ngif
ngFor
If you view the app.module.ts file, you will see the following code and the BrowserModule module defined. By defining this module, you will have access to the 2 directives.
A simple tutorial for understanding the basics of angular JS. Very useful for the beginners. Also useful for the quick revision. Very attractive design for the tutorial of angular js.
The document outlines an online training course for Angular 10 that covers fundamental concepts like TypeScript, Angular fundamentals, NgRx, server-side integration with Node and Express, Angular Material, PrimeNG, and a final e-commerce project. The 50-day, 100-hour course includes daily live and hands-on training, video lessons, project files, and lifetime access for 6000 INR or $85. Key topics include Angular architecture, components, routing, HTTP requests, reactive forms, state management with NgRx, REST APIs, authentication, and deployment.
Angular 16 is the biggest release since the initial rollout of Angular, and it changes everything: Bye bye zones, change-detection, life-cycle, children-selectors, Rx and what not.
Recorded webinar based on these slides given by Yaron Biton, Misterbit Coding-Academy’s CTO, can be found at: https://www.youtube.com/watch?v=92K1fgPbku8
Coding-Academy offers advanced web-techs training and software development services: Top-rated Full-stack courses for Angular, React, Vue, Node, Modern architectures, etc. | Available top-notch on-demand-coders trough Misterbit technological solutions | Coding-Academy Bootcamp: Hundreds of employed full-stack developers every year | Anything web, end to end projects | Tech companies and startups | Consulting to management and dev teams | Workshops for managers and leaders.
The document provides information about Angular data binding and event handling. It discusses how interpolation can be used to connect data from a component class to its template. It also explains how property binding and event binding allow two-way communication between the component class and template. Finally, it introduces ngModel for setting up two-way data binding between an input element and a property.
An Open-Source JavaScript Framework
It’s used to build Single Page based Web Application (SPA)
Developed by Google,
Release date March 2017,
Current version 4.4.6 (stable).
The document summarizes Angular directives including ngIf, ngFor, ngSwitchCase, ngClass, and ngStyle. It describes how ngIf and ngFor are structural directives that change the DOM layout by adding and removing elements. NgIf and ngFor use an asterisk syntax that gets desugared into <ng-template> elements. NgFor iterates over collections and supports additional syntax like trackBy. NgSwitch is a set of cooperating directives that displays different elements based on a switch expression. NgClass and ngStyle are attribute directives that update CSS classes and styles on elements.
The document discusses Angular routing and provides an example implementation. It first generates components for home, about, userList and user pages. It then sets up routes in app.module.ts to link URLs like /home and /about to their corresponding components. Navigation links using routerLink are added. To handle empty/invalid URLs, a default route is set to redirect to /home. Sub-routes are created under /user linking /user/list to UserListComponent, which displays a list of users. Clicking a user name creates a child route passing the name as a parameter to the UserComponent to display that user's details page.
Learn all the essentials of building Angular 2 applications right here.
https://www.udemy.com/angular-2-training/?couponCode=UANGULAR2
This is a beginner level course aimed at those new to Angular 2 and Typescript. No previous knowledge of either is required before starting this course.
This course combines slides, projects and quizzes in a clear, concise and engaging way to guide you through the core concepts of Angular 2 and Typescript.
You will gain a solid foundation for building real-world applications following best practices and the Angular 2 style guide. This includes how to build components, create shared services, navigate between views, manage data, and managing user and system events.
Angular Kickstart document provides an overview of Angular including:
- Angular is a client side JavaScript framework that allows building of single page applications.
- A single page application loads initial content via the first page load and subsequent content without reloading the page.
- The document discusses Angular features such as modularity, performance, TypeScript support, and building blocks like modules, components and directives. It also provides instructions on setting up the development environment for Angular applications.
Angular is an open source JavaScript framework that is used to build single page based web applications.A detailed overview of Angular 4, Its features, development environment and components.
Angular is an open-source JavaScript framework for building mobile and desktop web applications. It uses TypeScript for development and focuses on building single page applications. The key aspects of Angular include components, modules, templates and data binding.
To set up an Angular application, developers must install Node.js, Angular CLI and configure the development environment. The Angular CLI is used to generate components, run tests and deploy applications. Components and modules are fundamental building blocks - components define views and logic, while modules organize an application's components. Data binding in templates connects application data and DOM elements.
Angular is a platform and framework for building single-page client applications using HTML and TypeScript. The basic building blocks of Angular include components, modules, directives, decorators, pipes, data binding, templates, and services. Components define views with templates and logic. Modules organize related code. Directives modify DOM elements. Decorators add metadata. Pipes transform data. Data binding syncs data and UI. Templates define views. Services provide reusable functionality.
This document discusses data binding in Angular, including the differences between HTML attributes and DOM properties, the three types of data binding (one way and two way), and examples of each type of binding. It explains that one way binding can update properties, classes, styles, attributes and listen to events, but not read values. Two way binding uses the NgModel directive to both display and update a data property when the view changes. The document provides examples of property, event, class, style and attribute binding and how Angular matches bindings to component properties and events.
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript. It is an update to AngularJS with a focus on mobile and typesafety. Major versions include Angular 1.x, 2.x, 4.x and 5.x. Angular uses components, services and modules to build applications with templates and styles. It is compiled to JavaScript using transpilation and supports AOT and JIT compilation. Common tools used with Angular include the Angular CLI, Webpack and Zone.js.
AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. AngularJS's data binding and dependency injection eliminate much of the code you would otherwise have to write. And it all happens within the browser, making it an ideal partner with any server technology.
Http Service will help us fetch external data, post to it, etc. We need to import the http module to make use of the http service. Let us consider an example to understand how to make use of the http service.
Introduction to angular with a simple but complete projectJadson Santos
Angular is a framework for building client applications in HTML, CSS and TypeScript. It provides best practices like modularity, separation of concerns and testability for client-side development. The document discusses creating an Angular project, generating components, binding data, using directives, communicating with backend services, routing between components and building for production. Key steps include generating components, services and modules, binding data, calling REST APIs, defining routes and building the app.
This document outlines an AngularJS certification training agenda that covers directives. It defines directives as classes that extend HTML and transform the DOM. There are three types of directives: components, structural directives, and attribute directives. Built-in directives like NgFor and NgIf are covered, which add and remove elements. The document demonstrates how to create a custom attribute directive by using the @Directive decorator and accessing native DOM elements.
Angular is a platform for building applications with templates, dependency injection, and integrated tools. It contains modules, components, directives, routing, and services as building blocks. Modules contain routes, components, directives, and services. Components form part of the DOM tree. Directives attach behavior to DOM elements. Routing enables navigation between views. Services provide business logic and data access. The Angular CLI is used to generate, develop, and maintain Angular applications.
This document provides an overview of Angular, including:
- Angular is a JavaScript framework used to build client-side applications with HTML. Code is written in TypeScript which compiles to JavaScript.
- Angular enhances HTML with directives, data binding, and dependency injection. It follows an MVC architecture internally.
- Components are the basic building blocks of Angular applications. Modules contain components and services. Services contain reusable business logic.
- The document discusses Angular concepts like modules, components, data binding, services, routing and forms. It provides examples of creating a sample login/welcome application in Angular.
Webstack Academy is a new age IT finishing school offering best in class courses in Web and Application development. Our FullStack development courses (mainly based on MEAN stack) provides excellent hands-on approach to enable you get started with your first job. It also maintains a very good balance with foundations so that your learning is complete. Here is a presentation which talks about WSA.
This document discusses Angular components, dependency injection, and routing. It defines Angular as being built on modules, components, templates, and services. Components are the basic building blocks and make up a hierarchical tree structure. Dependency injection allows components to access services. Routing in Angular uses a router to navigate between views and components based on URL changes.
Angular is an open-source TypeScript-based front-end web application platform maintained by Google. It uses MVC and dependency injection patterns. Key features include components, services, routing and calling remote services. Version 1 was released in 2009 as AngularJS and the latest version is Angular 5. It is used to build large web applications and sites like Google and Uber.
A directive is a custom HTML element that is used to extend the power of HTML. Angular 2 has the following directives that get called as part of the BrowserModule module.
ngif
ngFor
If you view the app.module.ts file, you will see the following code and the BrowserModule module defined. By defining this module, you will have access to the 2 directives.
A simple tutorial for understanding the basics of angular JS. Very useful for the beginners. Also useful for the quick revision. Very attractive design for the tutorial of angular js.
The document outlines an online training course for Angular 10 that covers fundamental concepts like TypeScript, Angular fundamentals, NgRx, server-side integration with Node and Express, Angular Material, PrimeNG, and a final e-commerce project. The 50-day, 100-hour course includes daily live and hands-on training, video lessons, project files, and lifetime access for 6000 INR or $85. Key topics include Angular architecture, components, routing, HTTP requests, reactive forms, state management with NgRx, REST APIs, authentication, and deployment.
Angular 16 is the biggest release since the initial rollout of Angular, and it changes everything: Bye bye zones, change-detection, life-cycle, children-selectors, Rx and what not.
Recorded webinar based on these slides given by Yaron Biton, Misterbit Coding-Academy’s CTO, can be found at: https://www.youtube.com/watch?v=92K1fgPbku8
Coding-Academy offers advanced web-techs training and software development services: Top-rated Full-stack courses for Angular, React, Vue, Node, Modern architectures, etc. | Available top-notch on-demand-coders trough Misterbit technological solutions | Coding-Academy Bootcamp: Hundreds of employed full-stack developers every year | Anything web, end to end projects | Tech companies and startups | Consulting to management and dev teams | Workshops for managers and leaders.
Angular - Chapter 4 - Data and Event HandlingWebStackAcademy
The document provides information about Angular data binding and event handling. It discusses how interpolation can be used to connect data from a component class to its template. It also explains how property binding and event binding allow two-way communication between the component class and template. Finally, it introduces ngModel for setting up two-way data binding between an input element and a property.
An Open-Source JavaScript Framework
It’s used to build Single Page based Web Application (SPA)
Developed by Google,
Release date March 2017,
Current version 4.4.6 (stable).
The document summarizes Angular directives including ngIf, ngFor, ngSwitchCase, ngClass, and ngStyle. It describes how ngIf and ngFor are structural directives that change the DOM layout by adding and removing elements. NgIf and ngFor use an asterisk syntax that gets desugared into <ng-template> elements. NgFor iterates over collections and supports additional syntax like trackBy. NgSwitch is a set of cooperating directives that displays different elements based on a switch expression. NgClass and ngStyle are attribute directives that update CSS classes and styles on elements.
The document discusses Angular routing and provides an example implementation. It first generates components for home, about, userList and user pages. It then sets up routes in app.module.ts to link URLs like /home and /about to their corresponding components. Navigation links using routerLink are added. To handle empty/invalid URLs, a default route is set to redirect to /home. Sub-routes are created under /user linking /user/list to UserListComponent, which displays a list of users. Clicking a user name creates a child route passing the name as a parameter to the UserComponent to display that user's details page.
Learn all the essentials of building Angular 2 applications right here.
https://www.udemy.com/angular-2-training/?couponCode=UANGULAR2
This is a beginner level course aimed at those new to Angular 2 and Typescript. No previous knowledge of either is required before starting this course.
This course combines slides, projects and quizzes in a clear, concise and engaging way to guide you through the core concepts of Angular 2 and Typescript.
You will gain a solid foundation for building real-world applications following best practices and the Angular 2 style guide. This includes how to build components, create shared services, navigate between views, manage data, and managing user and system events.
Angular Kickstart document provides an overview of Angular including:
- Angular is a client side JavaScript framework that allows building of single page applications.
- A single page application loads initial content via the first page load and subsequent content without reloading the page.
- The document discusses Angular features such as modularity, performance, TypeScript support, and building blocks like modules, components and directives. It also provides instructions on setting up the development environment for Angular applications.
Angular is an open source JavaScript framework that is used to build single page based web applications.A detailed overview of Angular 4, Its features, development environment and components.
Angular is an open-source JavaScript framework for building mobile and desktop web applications. It uses TypeScript for development and focuses on building single page applications. The key aspects of Angular include components, modules, templates and data binding.
To set up an Angular application, developers must install Node.js, Angular CLI and configure the development environment. The Angular CLI is used to generate components, run tests and deploy applications. Components and modules are fundamental building blocks - components define views and logic, while modules organize an application's components. Data binding in templates connects application data and DOM elements.
Angular is a platform and framework for building single-page client applications using HTML and TypeScript. The basic building blocks of Angular include components, modules, directives, decorators, pipes, data binding, templates, and services. Components define views with templates and logic. Modules organize related code. Directives modify DOM elements. Decorators add metadata. Pipes transform data. Data binding syncs data and UI. Templates define views. Services provide reusable functionality.
This document discusses Angular structural elements like components. It explains that components are the fundamental building blocks of Angular applications and display data, listen for user input, and take actions. A component is distributed over three files - a TypeScript class file, an HTML template file, and a CSS styles file. The document provides details on creating a new component using the Angular CLI command and the structure of the component class file with the @Component decorator and lifecycle hooks. It also describes how the component template file uses HTML along with Angular directives and bindings.
How does Angular Work? So far, we've covered a number of specific information regarding the processes involved in creating Angular applications.
For more Information: https://www.albiorixtech.com/blog/how-does-angular-work/
Components are the most basic UI building block of an Angular app. An Angular app contains a tree of Angular components.
Angular components are a subset of directives, always associated with a template. Unlike other directives, only one component can be instantiated per an element in a template.
A component must belong to an NgModule in order for it to be available to another component or application. To make it a member of an NgModule, list it in the declarations field of the NgModule metadata.
Angular is considered as one of the most popular software development instruments today. Many custom Angular software development companies are seeing positive results after adopting Angular and the popularity of Angular with compared to other technologies is far high throughout 2019 and might be rise in 2020 as well as per the current trend.
"This article originally appeared in iFour Technolab Blog."
This document also gives a source link.
The document provides an agenda and recap for an Angular workshop session. The agenda covers Angular component lifecycle, modularizing Angular applications, Angular routing, and hands-on examples. The recap summarizes key points from the previous session, including why Angular is used for single page applications, its building blocks like components and services, and TypeScript. It also discusses Angular component lifecycle hooks and provides an example flow. The hands-on section describes refactoring a weather application to add routing and modularization. Essential coding practices like separation of concerns and reusability are also covered.
Angular is an open source JavaScript framework for building web applications. It was developed by Google and released in 2017. Some key features include being cross-platform for mobile and desktop, high performance, and productivity. The document outlines how to set up a development environment with Node.js and npm, create a new Angular project using the Angular CLI, and describes the basic structure of an Angular project including components, TypeScript, and data binding.
AngularJs 2.0 introduces components as the fundamental building blocks, replacing directives. The presentation covers getting started with AngularJs 2.0, including dependencies, configuration, components, data binding, services, routing and migration from Angular 1. It emphasizes that Angular 2 is a rewrite built on newer standards to improve performance and reduce opinionation. Migration involves componentizing the application and using an upgrade adapter to support a hybrid Angular 1 and 2 app.
This document contains summaries of 75 frequently asked Angular interview questions. It begins by defining Angular as a JavaScript framework developed by Google for building applications using web technologies like HTML, CSS, and JavaScript. It then goes on to summarize questions about setting up the Angular development environment, Angular CLI, components, data binding, directives, lifecycle hooks, and various methods for sharing data between components.
Valentine with Angular js - IntroductionSenthil Kumar
This document provides an overview of AngularJS, including what it is, why it is useful, basic concepts, and how to get started. AngularJS is an open-source JavaScript framework for building single-page applications. It uses HTML as the template language and allows binding data to HTML elements. Some key benefits are less boilerplate code, improved maintainability through separation of concerns using an MVC pattern, and efficient development through features like data binding. The document outlines how to include AngularJS scripts, core concepts like directives, controllers and models, and recommends resources for learning more.
This document provides an introduction to Angular 2, including why it was developed, its key features and components, and how to set up an Angular 2 development environment. Some of the main points covered include:
- Angular 2 is a rewrite of Angular 1 and focuses on components over controllers, uses TypeScript, and supports services and mobile development better.
- It introduces components, modules, templates, and metadata. Common components include modules, components, and services.
- To set up Angular 2, developers need to install Node.js, npm, and use the Angular CLI to generate projects, or clone the quick start repository. The Angular CLI helps to create, develop, and maintain
Angular is a JavaScript framework for building client-side web applications. It was created and is maintained by Google. Some key points:
- Angular uses components to build modular applications
- It utilizes TypeScript for type safety and features like classes and interfaces
- The framework emphasizes dependency injection, data binding, and directives
Angular Best Practices To Build Clean and Performant Web ApplicationsAlbiorix Technology
Check the angular best practices to be implemented in your next angular web development project. Here we bring some 14 angular best practices to try.
For More Information: https://www.albiorixtech.com/blog/angular-best-practices/
Are you wondering how to migrate to the Cloud? At the ITB session, we addressed the challenge of managing multiple ColdFusion licenses and AWS EC2 instances. Discover how you can consolidate with just one EC2 instance capable of running over 50 apps using CommandBox ColdFusion. This solution supports both ColdFusion flavors and includes cb-websites, a GoLang binary for managing CommandBox websites.
Break data silos with real-time connectivity using Confluent Cloud Connectorsconfluent
Connectors integrate Apache Kafka® with external data systems, enabling you to move away from a brittle spaghetti architecture to one that is more streamlined, secure, and future-proof. However, if your team still spends multiple dev cycles building and managing connectors using just open source Kafka Connect, it’s time to consider a faster and cost-effective alternative.
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdfonemonitarsoftware
WhatsApp Tracker Software is an effective tool for remotely tracking the target’s WhatsApp activities. It allows users to monitor their loved one’s online behavior to ensure appropriate interactions for responsive device use.
Download this PPTX file and share this information to others.
What is OCR Technology and How to Extract Text from Any Image for FreeTwisterTools
Discover the fascinating world of Optical Character Recognition (OCR) technology with our comprehensive presentation. Learn how OCR converts various types of documents, such as scanned paper documents, PDFs, or images captured by a digital camera, into editable and searchable data. Dive into the history, modern applications, and future trends of OCR technology. Get step-by-step instructions on how to extract text from any image online for free using a simple tool, along with best practices for OCR image preparation. Ideal for professionals, students, and tech enthusiasts looking to harness the power of OCR.
Efficient hot work permit software for safe, streamlined work permit management and compliance. Enhance safety today. Contact us on +353 214536034.
https://sheqnetwork.com/work-permit/
Discover the Power of ONEMONITAR: The Ultimate Mobile Spy App for Android Dev...onemonitarsoftware
Unlock the full potential of mobile monitoring with ONEMONITAR. Our advanced and discreet app offers a comprehensive suite of features, including hidden call recording, real-time GPS tracking, message monitoring, and much more.
Perfect for parents, employers, and anyone needing a reliable solution, ONEMONITAR ensures you stay informed and in control. Explore the key features of ONEMONITAR and see why it’s the trusted choice for Android device monitoring.
Share this infographic to spread the word about the ultimate mobile spy app!
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...Hironori Washizaki
Hironori Washizaki, "Charting a Course for Equity: Strategies for Overcoming Challenges and Promoting Inclusion in the Metaverse", IEEE COMPSAC 2024 D&I Panel, 2024.
Sami provided a beginner-friendly introduction to Amazon Web Services (AWS), covering essential terms, products, and services for cloud deployment. Participants explored AWS' latest Gen AI offerings, making it accessible for those starting their cloud journey or integrating AI into coding practices.
An MVP (Minimum Viable Product) mobile application is a streamlined version of a mobile app that includes only the core features necessary to address the primary needs of its users. The purpose of an MVP is to validate the app concept with minimal resources, gather user feedback, and identify any areas for improvement before investing in a full-scale development. This approach allows businesses to quickly launch their app, test its market viability, and make data-driven decisions for future enhancements, ensuring a higher likelihood of success and user satisfaction.
A captivating AI chatbot PowerPoint presentation is made with a striking backdrop in order to attract a wider audience. Select this template featuring several AI chatbot visuals to boost audience engagement and spontaneity. With the aid of this multi-colored template, you may make a compelling presentation and get extra bonuses. To easily elucidate your ideas, choose a typeface with vibrant colors. You can include your data regarding utilizing the chatbot methodology to the remaining half of the template.
2. Jennifer Jirka
• Senior Consultant, with Avanade for 4.5 years
• Web Application Development SIG Lead
• 6 years of experience with JavaScript web
development
• 3 years of experience with Angular JS
• Project experience with Angular IO
• I love writing and speaking about Angular
• Personal career goals focus on teaching and
mentoring
• 6 month old junior analyst developer at home
5. What is Angular IO?
• Angular IO is a framework for object oriented web development of
single page web applications.
• It is not an MVC framework, but rather a component-based
framework.
• An Angular IO application is a tree of loosely coupled components.
• Components are custom HTML elements, which couple structure
with functionality.
• Using custom HTML elements, developers can create a web app
declaratively.
6. Review: Single Page Applications
Web 1.0
Web 2.0
SPA
AJAX
Single Page Applications render HTML to the browser once and subsequent communication is AJAX.
Server sends
static pages.
7. Fond memories: Angular JS
• Angular JS is a JavaScript framework which allows the user to create custom
HTML elements which couple structure and function.
• Angular JS databinding is built on JavaScript variable scope, and can get
confusing.
• The bootstrap process in Angular JS is based on the ng-app framework HTML
directive.
• Angular JS architecture uses directives and controllers.
8. New Platform: Angular IO
• Angular IO is a TypeScript-based web development platform.
• Angular IO is a complete rewrite of Angular JS.
• Angular IO uses a hierarchy of components for databinding and scope, which is
significantly simplified from Angular JS.
• Angular IO supports named dependency injection.
• Angular IO is compatible with RxJS reactive programming.
• Convention: “Angular” == Angular 2.x, Angular IO
“Angular JS” == Angular 1.x
9. Angular IO is based on Components
• Apps built with Angular IO are defined by a tree of components
• The base of the tree is a root component
• Entire DOM cascades from the root component
11. TypeScript is a Superset of JavaScript
• TypeScript is a strongly typed superset of JavaScript.
• .TS files get compiled to .JS files using a TypeScript compiler.
• The Angular CLI compiles TypeScript in an Angular app (more on this
later)
You can install a simple TypeScript compiler with NPM:
npm install –g typescript
12. Why switch to TypeScript?
(Skipping TypeScript fundamentals for this talk)
• JavaScript built from TypeScript is significantly faster, at the expense of human
readability.
• TypeScript strong inline types and decorators add the most run-time efficiency.
• The authors of Angular JS used a JavaScript optimizer called the Closure Compiler
which builds down JavaScript into similar output.
• The Closure Compiler influenced the decision to move Angular IO to TypeScript
You can download the Closure Compiler if you are curious here:
https://github.com/google/closure-compiler-js
13. TypeScript Decorators
• A Decorator can be attached to a class declaration, method, accessor, property, or
parameter.
• Decorators use the form @expression, where expression must evaluate to a
function that will be called at runtime
Example: the @Inject decorator.
Inject is defined in the Angular framework and is used to inject named
dependencies
export class HeroComponent {
constructor(@Inject('heroName') private name: string) { }
}
15. Remember, Angular IO is based on Components
• Apps built with Angular IO are defined by a tree of components
• The base of the tree is a root component
• Entire DOM cascades from the root component
16. Components couple structure and function
• A component is a TypeScript object class which uses the
@Component decorator to tell Angular that it defines a component.
• Use the @Component metadata to add properties including the
HTML template where the structure is defined.
• Add members to the object class to define functionality.
• Call member functions on events defined in HTML template
• Use object class constructor and member functions to work with data
/* You need to add new component to modules using @NgModule
(more on this later) */
17. Example Component
import { Component, Input } from '@angular/core';
import { Hero } from './hero';
@Component({
selector: 'hero-detail',
template: `
<div *ngIf="hero">
<h2>{{hero.name}} details!</h2>
<div>
<label>name: </label>
<input [(ngModel)]="hero.name" placeholder="name"/>
</div>
</div>`
})
export class HeroDetailComponent {
@Input() hero: Hero;
}
Import statements make other exported
and platform classes available
Use @Component decorator to add metadata.
The selector attribute specifies the custom HTML tag which
declares your component
Match the component class name in UpperCamelCase to the
class name in lower-dash-case
The template can show inline HTML
or point to a file
Use @Input decorator to bind local variables to
data models.
Export your class so other modules cam import it.
18. Code Modules and AppModule
• Modules organize code into functional units.
• Modules are loosely analogous to namespaces in C style languages.
• Organize all modules in a tree structure, with the root module called
AppModule at the root.
• By convention, define AppModule in app.module.ts.
• AppModule should contain a reference to your base component, called
AppComponent by convention.
19. Root AppModule Example
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
@NgModule({
imports: [ BrowserModule ],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
Import AppComponent,
where base component is
defined.
Use NgModule decorator to
declare modules
20. Very Basic Angular App
src/app/app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from
'@angular/platform-browser';
import { AppComponent } from
'./app.component';
@NgModule({
imports: [ BrowserModule ],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
src/app/app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: '<h1>{{title}}</h1>',
})
export class AppComponent {
title = 'Minimal NgModule';
}
22. Simple JiT Bootstrapping
• An application is launched by bootstrapping its root module (AppModule)
• The main entry point of the application is main.ts, which contains a statement like below.
Angular loads this first.
import { AppModule } from './app/app.module';
• Index.html should contain an app HTML element. <app></app>
• Launch your application by adding a bootstrap statement to main.ts:
platformBrowserDynamic().bootstrapModule(AppModule);
• The Angular framework renders AppComponent on the app HTML element and the component
tree will cascade from here.
23. Bootstrap Process: Putting it all Together
0. Angular uses a bootstrap statement defined in main.ts to launch the application
as discussed above.
1. On document.ready, the Angular framework looks for a root module defined in
your main.ts file using a statement like this:
import { AppModule } from './app/app.module';
2. The framework also looks for a root component defined in your app.module.ts
file. You will find a statement like this:
export class AppModule { }
3. Your AppModule class should contain an import statement pointing to your base
app component like this:
import { AppComponent } from './app.component';
4. When the AppComponent is loaded, it is applied to the <app> HTML element in
index.html.
26. Angular Command Line Interface Tool
The Angular CLI is a Command Line Interface (CLI) to automate your
development workflow.
The Angular CLI allows you to:
• Create a new Angular application
• Run a development server with LiveReload support to preview your
application during development
• Add features to your existing Angular application
• Run your application’s unit tests
• Run your application’s end-to-end (E2E) tests
• Build your application for deployment to production
27. Angular CLI makes Angular easier
The Angular CLI streamlines the workflow for creating and building your app.
You can use the CLI to set up the basic structure files which we discussed
above.
The CLI can even set up a basic WebPack server for you so you can serve
your new app right away.
Once you have Node.js installed, you can install the Angular CLI to get up and
running quickly with Angular here:
https://github.com/angular/angular-cli
28. Get Started with a basic Angular App
1. Open a command prompt. Use your favorite way to install Node.js
globally.
2. Install the Angular CLI using npm install -g angular-cli
3. Find a working directory and switch to it. Think of a catchy name
for your new project.
4. Run ng new catchyNameHere
5. Run ng build
6. Run ng serve