SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Building a Website With
Angular
JOE JORDEN
@COBALTCODER WWW.COBALTCODER.COM
Why Are We Here?
 Learn to use various parts of Angular:
 Modules
 Components
 Templates
 Directives
 Services
 Pipes
 Custom Configuration
 Chrome Debugging
 Elements (time permitting)
Modules
 Cohesive block of code
 declarations - the view classes that belong to this module.
 Three kinds of view classes: components, directives, and pipes.
 exports - the subset of declarations made visible to other modules.
 imports - declares exports from other modules for use in the current module.
 providers - list of services that this module contributes to the global collection of
services; they become accessible in all parts of the app.
 bootstrap - the main application view, called the root component, that hosts all other
app views.
Demo - Modules
 Show app module
Components
 A component controls a section of the screen called a view.
 Component's application logic defined in a class.
 Class interacts with the view through an API.
Demo – Components
 Show existing components
Templates
 A form of HTML that tells Angular how to render the component.
 Looks like HTML with some subtle differences
 handlebars {{}}
 bindings
 Attribute: []
 Event: ()
 Two-way data: [()]
Demo – Templates
 Show existing templates
Directives
 A directive is a class that modifies the DOM.
 Decorated with @Directive
 When Angular renders a template, it transforms the DOM according to the
instructions given by directives.
 Some built-in directives
 *ngFor (structural directive)
 *ngIf (structural directive)
 ngModel (attribute directive)
 Can build custom directives
Demo - Directives
 Show *ngFor, *ngIf, ngModel in templates
 CountDown directive
Services
 Used to share information and methods between components
 Angular has no formal definition of a service
 Make it @Injectable for dependency injection
Demo - Services
 Show existing services
Pipes
 Used to modify output in a template
 Built-in pipes (https://angular.io/api?type=pipe)
 DatePipe
 CurrencyPipe
 DecimalPipe
 PercentPipe
 LowerCasePipe
 UpperCasePipe
 TitleCasePipe
 Pipes can be chained
 Can build custom pipes
Pipe Parameters
 Can send parameters using :
 I.E. <p>The client's anniversary is {{ anniversary | date:"MM/dd/yy" }} </p>
Demo - Pipes
 Show existing pipes
Using Custom Configuration
 Custom json files
 Access with custom class
Demo – Configuration
 Show custom configuration implementation
Debugging in Chrome
 Install extension
 Configure Launch.json
Demo – Debugging
 Show debugging in Chrome
Elements
 Custom elements that house the Angular component
 Self-bootstrapping
 Can be surfaced in other frameworks (e.g. React, Vue, Preact, etc.)
Demo - Elements
 Show elements
Summary
 Modules
 Components
 Templates
 Directives
 Services
 Pipes
 Custom Configuration
 Chrome Debugging
 Elements
References
 Code: https://github.com/CobaltCoder/CodeCamp2018
 SlideShare: https://www.slideshare.net/CobaltCoder/building-a-website-with-angular-2-80621227
 Blog: http://www.cobaltcoder.com
 In depth tutorial: http://www.angular.io

Weitere ähnliche Inhalte

Was ist angesagt?

Development of forms editors based on Ecore metamodels
Development of forms editors based on Ecore metamodelsDevelopment of forms editors based on Ecore metamodels
Development of forms editors based on Ecore metamodels
Mario Cervera
 
Server side scripts
Server side scriptsServer side scripts
Server side scripts
grahamwell
 

Was ist angesagt? (16)

Introduction To Angular 4 - J2I
Introduction To Angular 4 - J2IIntroduction To Angular 4 - J2I
Introduction To Angular 4 - J2I
 
はじめてのAngular2
はじめてのAngular2はじめてのAngular2
はじめてのAngular2
 
Routing
RoutingRouting
Routing
 
Mule
MuleMule
Mule
 
Introduction to Unit Tests and TDD
Introduction to Unit Tests and TDDIntroduction to Unit Tests and TDD
Introduction to Unit Tests and TDD
 
IMPROVE YOUR WEBSITE PERFORMANCE WITH ANGULAR JS2
IMPROVE YOUR WEBSITE PERFORMANCE WITH ANGULAR JS2IMPROVE YOUR WEBSITE PERFORMANCE WITH ANGULAR JS2
IMPROVE YOUR WEBSITE PERFORMANCE WITH ANGULAR JS2
 
Angular 4 for Java Developers
Angular 4 for Java DevelopersAngular 4 for Java Developers
Angular 4 for Java Developers
 
Development of forms editors based on Ecore metamodels
Development of forms editors based on Ecore metamodelsDevelopment of forms editors based on Ecore metamodels
Development of forms editors based on Ecore metamodels
 
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
 
VS Saturday 2019 - Xamarin.Forms 4.x
VS Saturday 2019 - Xamarin.Forms 4.xVS Saturday 2019 - Xamarin.Forms 4.x
VS Saturday 2019 - Xamarin.Forms 4.x
 
Server side scripts
Server side scriptsServer side scripts
Server side scripts
 
Angular server side rendering - Strategies & Technics
Angular server side rendering - Strategies & Technics Angular server side rendering - Strategies & Technics
Angular server side rendering - Strategies & Technics
 
Automake
AutomakeAutomake
Automake
 
Backward Compatibility Developer's Guide in Magento 2
Backward Compatibility Developer's Guide in Magento 2Backward Compatibility Developer's Guide in Magento 2
Backward Compatibility Developer's Guide in Magento 2
 
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
 
Oro Workflows
Oro WorkflowsOro Workflows
Oro Workflows
 

Ähnlich wie Building a website with angular

Ähnlich wie Building a website with angular (20)

Angular 9
Angular 9 Angular 9
Angular 9
 
Angular Basics.pptx
Angular Basics.pptxAngular Basics.pptx
Angular Basics.pptx
 
AngularJS: Overview & Key Features
AngularJS: Overview & Key FeaturesAngularJS: Overview & Key Features
AngularJS: Overview & Key Features
 
Angular js workshop
Angular js workshopAngular js workshop
Angular js workshop
 
Angular from Zero to Mastery - Training (Intermediate)
Angular from Zero to Mastery - Training (Intermediate)Angular from Zero to Mastery - Training (Intermediate)
Angular from Zero to Mastery - Training (Intermediate)
 
Angular 2.0
Angular  2.0Angular  2.0
Angular 2.0
 
Building Blocks of Angular 2 and ASP.NET Core
Building Blocks of Angular 2 and ASP.NET CoreBuilding Blocks of Angular 2 and ASP.NET Core
Building Blocks of Angular 2 and ASP.NET Core
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular js
 
Angular js
Angular jsAngular js
Angular js
 
Single Page Applications in SharePoint with Angular
Single Page Applications in SharePoint with AngularSingle Page Applications in SharePoint with Angular
Single Page Applications in SharePoint with Angular
 
angularJs Workshop
angularJs WorkshopangularJs Workshop
angularJs Workshop
 
Angular patterns
Angular patternsAngular patterns
Angular patterns
 
AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014
 
Services Factory Provider Value Constant - AngularJS
Services Factory Provider Value Constant - AngularJSServices Factory Provider Value Constant - AngularJS
Services Factory Provider Value Constant - AngularJS
 
Angular Interview Questions & Answers
Angular Interview Questions & AnswersAngular Interview Questions & Answers
Angular Interview Questions & Answers
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - Components
 
Angular interview questions
Angular interview questionsAngular interview questions
Angular interview questions
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
 
AngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIAngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPI
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 

Kürzlich hochgeladen

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Kürzlich hochgeladen (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 

Building a website with angular

  • 1. Building a Website With Angular JOE JORDEN @COBALTCODER WWW.COBALTCODER.COM
  • 2. Why Are We Here?  Learn to use various parts of Angular:  Modules  Components  Templates  Directives  Services  Pipes  Custom Configuration  Chrome Debugging  Elements (time permitting)
  • 3. Modules  Cohesive block of code  declarations - the view classes that belong to this module.  Three kinds of view classes: components, directives, and pipes.  exports - the subset of declarations made visible to other modules.  imports - declares exports from other modules for use in the current module.  providers - list of services that this module contributes to the global collection of services; they become accessible in all parts of the app.  bootstrap - the main application view, called the root component, that hosts all other app views.
  • 4. Demo - Modules  Show app module
  • 5. Components  A component controls a section of the screen called a view.  Component's application logic defined in a class.  Class interacts with the view through an API.
  • 6. Demo – Components  Show existing components
  • 7. Templates  A form of HTML that tells Angular how to render the component.  Looks like HTML with some subtle differences  handlebars {{}}  bindings  Attribute: []  Event: ()  Two-way data: [()]
  • 8. Demo – Templates  Show existing templates
  • 9. Directives  A directive is a class that modifies the DOM.  Decorated with @Directive  When Angular renders a template, it transforms the DOM according to the instructions given by directives.  Some built-in directives  *ngFor (structural directive)  *ngIf (structural directive)  ngModel (attribute directive)  Can build custom directives
  • 10. Demo - Directives  Show *ngFor, *ngIf, ngModel in templates  CountDown directive
  • 11. Services  Used to share information and methods between components  Angular has no formal definition of a service  Make it @Injectable for dependency injection
  • 12. Demo - Services  Show existing services
  • 13. Pipes  Used to modify output in a template  Built-in pipes (https://angular.io/api?type=pipe)  DatePipe  CurrencyPipe  DecimalPipe  PercentPipe  LowerCasePipe  UpperCasePipe  TitleCasePipe  Pipes can be chained  Can build custom pipes
  • 14. Pipe Parameters  Can send parameters using :  I.E. <p>The client's anniversary is {{ anniversary | date:"MM/dd/yy" }} </p>
  • 15. Demo - Pipes  Show existing pipes
  • 16. Using Custom Configuration  Custom json files  Access with custom class
  • 17. Demo – Configuration  Show custom configuration implementation
  • 18. Debugging in Chrome  Install extension  Configure Launch.json
  • 19. Demo – Debugging  Show debugging in Chrome
  • 20. Elements  Custom elements that house the Angular component  Self-bootstrapping  Can be surfaced in other frameworks (e.g. React, Vue, Preact, etc.)
  • 21. Demo - Elements  Show elements
  • 22. Summary  Modules  Components  Templates  Directives  Services  Pipes  Custom Configuration  Chrome Debugging  Elements
  • 23. References  Code: https://github.com/CobaltCoder/CodeCamp2018  SlideShare: https://www.slideshare.net/CobaltCoder/building-a-website-with-angular-2-80621227  Blog: http://www.cobaltcoder.com  In depth tutorial: http://www.angular.io