SlideShare a Scribd company logo
[Da Nang Scrum Breakfast] Angular Tour
www.axon.vnfb.com/AxonActiveVietNam
www.axon.vnfb.com/AxonActiveVietNam
Who I am
www.axon.vnfb.com/AxonActiveVietNam
• Web development overview
• Introduction of Angular
• Build your own application
• Touch to the most important parts in Angular
• Workshop
Agenda
www.axon.vnfb.com/AxonActiveVietNam
History of Web development
www.axon.vnfb.com/AxonActiveVietNam
Server side rendering
www.axon.vnfb.com/AxonActiveVietNam
Ajax
Ajax(asynchronous JavaScript and XML): Used to update a part of screen.
If client have list users, we can update UI in client side.
www.axon.vnfb.com/AxonActiveVietNam
Client side rendering
www.axon.vnfb.com/AxonActiveVietNam
Modern JavaScript frameworks
www.axon.vnfb.com/AxonActiveVietNam
Angular?
www.axon.vnfb.com/AxonActiveVietNam
Angular
JUST
www.axon.vnfb.com/AxonActiveVietNam
• Angular 2.0.0 was released in September 2016
• Angular 4.0.0 was released in March 2017 and backwards
compatible with 2.x.x.
• Current version is 4.3.1
Angular Roadmap
www.axon.vnfb.com/AxonActiveVietNam
• Fix a bug and release it, increase the last number.
• A new feature is added, increase the second number.
• Release a breaking change, increase the first number.
Semantic Versioning
www.axon.vnfb.com/AxonActiveVietNam
Why not version 3 then?
www.axon.vnfb.com/AxonActiveVietNam
• Patch releases every week.
• 3 monthly minor release after each major release.
• A major release with easy-to-migrate-over breaking changes
every 6 months.
Tentative release schedule
www.axon.vnfb.com/AxonActiveVietNam
• Support for web components
• Usage of Typescript
• Great performance
• Angular CLI
• General simplicity of the interface
• A stronger templating system
• Possesses easier APIs, lazy loading, simpler/faster debugging
• Much more testable
• Provides nested components
• Google and the lesson learn
Why Angular?
www.axon.vnfb.com/AxonActiveVietNam
Creating app in 3 steps
1. Setup the environment
2. Create a new project
3. Serve the application
www.axon.vnfb.com/AxonActiveVietNam
Architecture overview
www.axon.vnfb.com/AxonActiveVietNam
Modules
www.axon.vnfb.com/AxonActiveVietNam
Modules
www.axon.vnfb.com/AxonActiveVietNam
Modules
www.axon.vnfb.com/AxonActiveVietNam
Modules
www.axon.vnfb.com/AxonActiveVietNam
Component
www.axon.vnfb.com/AxonActiveVietNam
Component
www.axon.vnfb.com/AxonActiveVietNam
Template
www.axon.vnfb.com/AxonActiveVietNam
Data Binding
www.axon.vnfb.com/AxonActiveVietNam
Two-Way Binding
www.axon.vnfb.com/AxonActiveVietNam
Parent – Child communication
www.axon.vnfb.com/AxonActiveVietNam
@Input and @Output
www.axon.vnfb.com/AxonActiveVietNam
World of Components
www.axon.vnfb.com/AxonActiveVietNam
Types of component
 Dumb or Representational component
 Smart or Container component.
www.axon.vnfb.com/AxonActiveVietNam
Dump or Smart?
www.axon.vnfb.com/AxonActiveVietNam
Directives
www.axon.vnfb.com/AxonActiveVietNam
Types of Directive
www.axon.vnfb.com/AxonActiveVietNam
Services
 Value, function or feature.
 Almost anything can be a service.
 Typically a class with well-defined
purpose.
 Services should be everywhere.
www.axon.vnfb.com/AxonActiveVietNam
Dependency Injection
www.axon.vnfb.com/AxonActiveVietNam
HttpClient
www.axon.vnfb.com/AxonActiveVietNam
Routing & Navigation
 Router imports
 Configuration
 Router outlet
 Router links
 Router state
www.axon.vnfb.com/AxonActiveVietNam
Testing
www.axon.vnfb.com/AxonActiveVietNam
Testing: Tools and technologies
www.axon.vnfb.com/AxonActiveVietNam
Give it a try
Workshop instruction: https://goo.gl/jvgBBT
www.axon.vnfb.com/AxonActiveVietNam

More Related Content

PPTX
[HCM Scrum Breakfast - June 2017] Distributed Team
Scrum Breakfast Vietnam
 
PPTX
[HCM Scrum Breakfast - April 17] Dysfunctional Scrum Roles
Scrum Breakfast Vietnam
 
PDF
Real-life multiple scrum teams - Mr. Thong & Ms. Diem
Scrum Breakfast Vietnam
 
PDF
HCM Scrum Breakfast – The real life of Scrumban team
Scrum Breakfast Vietnam
 
PDF
Full stack developer with Scrum - Thanh Le & Khanh Vo
Scrum Breakfast Vietnam
 
PDF
Getting started with #Noestimates
Scrum Breakfast Vietnam
 
PPTX
The power of funny retrospectives - Speaker: Ms. Linh Pham
Scrum Breakfast Vietnam
 
[HCM Scrum Breakfast - June 2017] Distributed Team
Scrum Breakfast Vietnam
 
[HCM Scrum Breakfast - April 17] Dysfunctional Scrum Roles
Scrum Breakfast Vietnam
 
Real-life multiple scrum teams - Mr. Thong & Ms. Diem
Scrum Breakfast Vietnam
 
HCM Scrum Breakfast – The real life of Scrumban team
Scrum Breakfast Vietnam
 
Full stack developer with Scrum - Thanh Le & Khanh Vo
Scrum Breakfast Vietnam
 
Getting started with #Noestimates
Scrum Breakfast Vietnam
 
The power of funny retrospectives - Speaker: Ms. Linh Pham
Scrum Breakfast Vietnam
 

What's hot (20)

PPTX
Fa102 assignment 5
IsaacDrew
 
PDF
Measuring Consumer Quality - The Missing Feedback Loop
Anand Bagmar
 
PPTX
Videogame designer
tbrown12345
 
PDF
Wc miami 2013 designing for development
onefinejay
 
PDF
Visual Validation - The Missing Tip of the Automation Pyramid
Anand Bagmar
 
PDF
[DevDay 2017] Lean Startup - Design Thinking - Speaker: Sebastian Sussmann - ...
DevDay Da Nang
 
PPTX
Webinar: On-Page SEO Tips and Tricks
WP Engine
 
PDF
What is Agile Testing? How does Automation help?
Anand Bagmar
 
PPTX
Смешиваем Scrum и Канбан
SQALab
 
DOCX
How to create web apps on azure step by step
Prashant Kumar Singh
 
PDF
Build the "right" regression suite using Behavior Driven Testing (BDT)
Anand Bagmar
 
PDF
Deploying & operating microservices
Thoughtworks
 
PPTX
Webinar: You Are Too Cheap!
WP Engine
 
PPTX
How to Copy Pages & Posts in WordPress
Prema Qadir
 
PDF
Invisible CMS by Robert Jacobi
jdaychi
 
PDF
What it takes to be a Web Developer
bryanbibat
 
PDF
Front-End Web Developer - Chelsea Career and Technical High School Career Day
Megan Taylor
 
PPTX
Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin
Michael Ridland
 
PPTX
Webinar: Myths, Mistakes and Management of WooCommerce at Scale
WP Engine
 
PPTX
How WPMaintain Improved Page Speed by 16%
WP Engine UK
 
Fa102 assignment 5
IsaacDrew
 
Measuring Consumer Quality - The Missing Feedback Loop
Anand Bagmar
 
Videogame designer
tbrown12345
 
Wc miami 2013 designing for development
onefinejay
 
Visual Validation - The Missing Tip of the Automation Pyramid
Anand Bagmar
 
[DevDay 2017] Lean Startup - Design Thinking - Speaker: Sebastian Sussmann - ...
DevDay Da Nang
 
Webinar: On-Page SEO Tips and Tricks
WP Engine
 
What is Agile Testing? How does Automation help?
Anand Bagmar
 
Смешиваем Scrum и Канбан
SQALab
 
How to create web apps on azure step by step
Prashant Kumar Singh
 
Build the "right" regression suite using Behavior Driven Testing (BDT)
Anand Bagmar
 
Deploying & operating microservices
Thoughtworks
 
Webinar: You Are Too Cheap!
WP Engine
 
How to Copy Pages & Posts in WordPress
Prema Qadir
 
Invisible CMS by Robert Jacobi
jdaychi
 
What it takes to be a Web Developer
bryanbibat
 
Front-End Web Developer - Chelsea Career and Technical High School Career Day
Megan Taylor
 
Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin
Michael Ridland
 
Webinar: Myths, Mistakes and Management of WooCommerce at Scale
WP Engine
 
How WPMaintain Improved Page Speed by 16%
WP Engine UK
 
Ad

Similar to [Da Nang Scrum Breakfast] Angular Tour (20)

PPTX
Angular jS Introduction by Google
ASG
 
PPTX
Eureko frameworks
Görkem Sazara
 
PDF
AngularJS in Production (CTO Forum)
Alex Ross
 
PPTX
AngularJS Anatomy & Directives
Digikrit
 
PDF
I - Front-end Spectrum
WebF
 
PDF
Javascript Client & Server Architectures
Pedro Melo Pereira
 
PPT
VFP & Ajax
Mike Feltman
 
PPTX
Ajax presentation
Bharat_Kumawat
 
PPT
Top java script frameworks ppt
Omkarsoft Bangalore
 
PPT
Using Ajax In Domino Web Applications
dominion
 
PPTX
Evolution of java script libraries
Columbia Developers Guild
 
PDF
Responsive web design with Angularjs
Arnab Pradhan
 
PPT
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
PPTX
Anjular js
Naga Dinesh
 
PPTX
Benefits of developing single page web applications using angular js
Harbinger Systems - HRTech Builder of Choice
 
PPTX
Ajax technology
Safal Agrawal
 
PPTX
JSON Part 2: Working with Ajax
Jeff Fox
 
PDF
Tech Stack - Angular
Srineel Mazumdar
 
PDF
What is mean stack?
Rishabh Saxena
 
PDF
AngularJS - A Powerful Framework For Web Applications
Idexcel Technologies
 
Angular jS Introduction by Google
ASG
 
Eureko frameworks
Görkem Sazara
 
AngularJS in Production (CTO Forum)
Alex Ross
 
AngularJS Anatomy & Directives
Digikrit
 
I - Front-end Spectrum
WebF
 
Javascript Client & Server Architectures
Pedro Melo Pereira
 
VFP & Ajax
Mike Feltman
 
Ajax presentation
Bharat_Kumawat
 
Top java script frameworks ppt
Omkarsoft Bangalore
 
Using Ajax In Domino Web Applications
dominion
 
Evolution of java script libraries
Columbia Developers Guild
 
Responsive web design with Angularjs
Arnab Pradhan
 
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
Anjular js
Naga Dinesh
 
Benefits of developing single page web applications using angular js
Harbinger Systems - HRTech Builder of Choice
 
Ajax technology
Safal Agrawal
 
JSON Part 2: Working with Ajax
Jeff Fox
 
Tech Stack - Angular
Srineel Mazumdar
 
What is mean stack?
Rishabh Saxena
 
AngularJS - A Powerful Framework For Web Applications
Idexcel Technologies
 
Ad

More from Scrum Breakfast Vietnam (20)

PPTX
[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...
Scrum Breakfast Vietnam
 
PDF
Zero to hero in agile automation testing
Scrum Breakfast Vietnam
 
PDF
Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019
Scrum Breakfast Vietnam
 
PDF
UI/UX Design in Agile process
Scrum Breakfast Vietnam
 
PPTX
Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019
Scrum Breakfast Vietnam
 
PPTX
Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019
Scrum Breakfast Vietnam
 
PPTX
Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019
Scrum Breakfast Vietnam
 
PPTX
Working as a remote team - HCM Scrum Breakfast - May 25, 2019
Scrum Breakfast Vietnam
 
PPTX
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Scrum Breakfast Vietnam
 
PPTX
Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...
Scrum Breakfast Vietnam
 
PPTX
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
Scrum Breakfast Vietnam
 
PPTX
Automation Testing in Agile - HCM Scrum Breakfast - July 2018
Scrum Breakfast Vietnam
 
PPTX
[DN Scrum Breakfast] API Automation Testing Using Retrofit & Cucumber
Scrum Breakfast Vietnam
 
PPTX
[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)
Scrum Breakfast Vietnam
 
PDF
[DN Scrum Breakfast] Effective Cloud Computing
Scrum Breakfast Vietnam
 
PPTX
[HCM Scrum Breakfast - January 2018] ElasticSearch In Action
Scrum Breakfast Vietnam
 
PPTX
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
Scrum Breakfast Vietnam
 
PPTX
[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016
Scrum Breakfast Vietnam
 
PPTX
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
Scrum Breakfast Vietnam
 
PDF
[Da Nang Scrum Breakfast] The power of visualization
Scrum Breakfast Vietnam
 
[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...
Scrum Breakfast Vietnam
 
Zero to hero in agile automation testing
Scrum Breakfast Vietnam
 
Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019
Scrum Breakfast Vietnam
 
UI/UX Design in Agile process
Scrum Breakfast Vietnam
 
Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019
Scrum Breakfast Vietnam
 
Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019
Scrum Breakfast Vietnam
 
Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019
Scrum Breakfast Vietnam
 
Working as a remote team - HCM Scrum Breakfast - May 25, 2019
Scrum Breakfast Vietnam
 
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Scrum Breakfast Vietnam
 
Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...
Scrum Breakfast Vietnam
 
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
Scrum Breakfast Vietnam
 
Automation Testing in Agile - HCM Scrum Breakfast - July 2018
Scrum Breakfast Vietnam
 
[DN Scrum Breakfast] API Automation Testing Using Retrofit & Cucumber
Scrum Breakfast Vietnam
 
[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)
Scrum Breakfast Vietnam
 
[DN Scrum Breakfast] Effective Cloud Computing
Scrum Breakfast Vietnam
 
[HCM Scrum Breakfast - January 2018] ElasticSearch In Action
Scrum Breakfast Vietnam
 
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
Scrum Breakfast Vietnam
 
[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016
Scrum Breakfast Vietnam
 
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
Scrum Breakfast Vietnam
 
[Da Nang Scrum Breakfast] The power of visualization
Scrum Breakfast Vietnam
 

Recently uploaded (20)

PPTX
TRAVEL APIs | WHITE LABEL TRAVEL API | TOP TRAVEL APIs
philipnathen82
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PDF
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
PDF
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
PDF
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PDF
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PPTX
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
PPTX
Presentation about variables and constant.pptx
kr2589474
 
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
PDF
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
TRAVEL APIs | WHITE LABEL TRAVEL API | TOP TRAVEL APIs
philipnathen82
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
Activate_Methodology_Summary presentatio
annapureddyn
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
Presentation about variables and constant.pptx
kr2589474
 
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 

[Da Nang Scrum Breakfast] Angular Tour

Editor's Notes

  • #7: Languages : php, jsp, asp... Data model, business logic keep in server side. Return HTML to browser. JavaScript just for validating before submit form. Disadvantage: reload page on every user’s interactions such as click
  • #9: Client side keep data state and do business logic Use rest API in server side. JavaScript (JQuery) processes business, manipulates DOM -> need a framework for managing, handling, binding data as well as manipulating effectively with DOM
  • #10: Backbone and Knockout: 2010 AngularJs 2010. Angular September 2016. React open source in 2013 VueJs 2014 AngularJs became very popular JS framework, had been used by 1000 developers over the world to develop so many applications.
  • #11: There is a confusion of the name and version of the angular platform, and it’s not convenient to search for learning, question on Stack Overflow or just talk with your partner.
  • #12: In order to solve this frustrating issue, the Angular team decided about the name terminology: the old angular, angular 1 is called AngularJS. And the new angular 2/2+/4/5 is called Angular, just Angular
  • #15: The Core Angular libraries are versioned the same way, but distributed as different NPM packages. Due to this misalignment of the router package’s version, the team decided to go straight for Angular v4. All the core packages are aligned which will be easier to maintain and help avoid confusion in the future.
  • #17: Rather than having a closed system for modularizing AngularJS applications, Angular’s foundations lie on the emerging Web Components standard. The biggest selling point of TypeScript is tooling. It provides advanced autocompletion, navigation, and refactoring. Having such tools is almost a requirement for large projects. Angular doesn't do deep object comparison. If items are added/removed to/from an array, change detection won't detect it. The same for object properties as long as they are not directly bound from the view. The Angular CLI makes it easy to create an application that already works, right out of the box. It already follows our best practices.
  • #18: On step 2, patience please. It takes time to set up a new project, most of it spent installing NPM packages.
  • #19: Framework for building client applications in HTML and JS ( or a language like TS that compiles to JS). Consists of several libraries, some of them core and some optional. Focus on the big picture, you’re able to see that we write NG app by: Composing HTML templates with ‘Angularized’ markup. Writing component classes to manage those templates. Adding application logic in services. Boxing or packing components and services in modules. Lunching the app by bootstrapping the root module. Angular takes over, presenting your application content in browser and responding to the user’s interaction.
  • #20: Angular apps are modular and Angular has its own modularity system call NgModules.
  • #21: At least one NgModule class, the root module, conventionally named AppModule. While the root module may be the only module in a small application, most apps have many more feature modules. Each feature module is used in order to help us organize our application into cohesive blocks of functionality. An NgModule is class with an @NgModule decorator
  • #22: Is a decorator function that takes a single metadata object whose properties describe the module. The most important properties are: The NgModule — a class decorated with @NgModule — is a fundamental feature of Angular.
  • #23: JS also has its own module system for managing collection of JS objects. It’s completely different and un-related to the NgModule system. In JS each file is a module and all objects defined in the file belong to that module.
  • #24: Component is a class which defined by @Component decorator. Component controls a patch of screen called a view. You define a component's application logic—what it does to support the view—inside a class. The class interacts with the view through an API of properties and methods. Template is component's view with its companion template. A template is a form of HTML that tells Angular how to render the component.
  • #25: You can either use ‘template’ or ‘templateUrl’ metadata property. How to bind data from component class to the view?
  • #26: A template looks like regular HTML, except for a few differences: typical html elements: <button>, <div> Code like {{buttonLabel}}, *ngFor, [participant], <participant-tile>, (click) uses Angular’s template syntax
  • #27: Without framework, you’re responsible for pushing data values into HTML and turning user’s responses into actions and value updates. Writing such a push/pull logic by hand is incredibly difficult and nightmare to read, as you might experience using JQuery. Angular supports data binding with four form syntaxes: to the DOM, from the DOM or in both directions.
  • #28: Is the combination of property and event binding in a single notation using ngModel directive. This is the only 2-way binding mechanism supported by Angular, of course, we’re able to make custom 2-way binding, however, it’s not recommended. In the 2-way data binding, a data property value flows to the input box from component as with property binding. The user’s changes also flow back to the component, resetting the property value to the latest value, as with event binding. Angular automatically creates and attaches an NgForm directive to the <form> tag. The NgForm directive supplements the form element with additional features. It holds the controls you created for the elements with an ngModel directive and name attribute, and monitors their properties, including their validity.
  • #29: Data binding is also important for communication between parent and child component.
  • #30: Property decorator, need to import from @angular/core. In case you’d like your component’s internal variable name is different from its usage, you’re able to use alias name. Input is used to pass data from parent to child. The child component exposes an EventEmitter property with which it emits events when something happens. The parent binds to that event property and reacts to those events. There are other ways to communicate between parent and child component such as: Local variable, @ViewChild decorator and service
  • #31: In Angular, everything is component, it is the main way we build and specify element and logic on the page.
  • #32: Basing upon the usage of components, they’re divided into two types.
  • #33: Could you please tell me which one should be dump and smart?
  • #34: A directive is a custom html element that is used to extend the power of HTML. Is a class with @Directive decorator, a component is a directive with a template. @Component decorator is actually a @Directive decorator extended with template oriented feature.
  • #35: There are two kinds of directive: Attribute and Structural directive Attribute directive changes the appearance or behavior of an element, component, or other directive, the usage as the same as html attribute. While structural directive changes the DOM layout by adding and removing DOM elements (change structure of view), there are two built-in: ngFor and ngIf
  • #36: How to communicate between component that not in parent-child relationship? How to fetch data from server, to play some business logic? Example: log service, data service, validation service, configuration data… Component classes should be clean, they don’t fetch data from server, validate user’s input…, they delegate such tasks to services. A component’s job is to enable user experience and nothing more, a good component presents properties and method for data binding.
  • #37: How can those services be available to components? Angular exposes these through Dependency Injection. DI is a way to supply new instance of a class with fully-form dependencies it requires. Most dependencies are services. Angular uses DI to provide new components with the services they need. Angular can tell which services a component needs by looking at the types of its constructor parameters (e.g..). When Angular -> component -> injector -> services -> call component’s constructor. How does the injector know how to make a service? -> Registration: via module or component
  • #38: Most front-end applications communicate with backend server over the HTTP protocol. Use: import HttpClientModule from ‘@angular/common/http’ -> inject HttpClient to component or services.
  • #39: How does it navigate from list to detail view? The Angular Router enables navigation from one view to the next as users perform application tasks. After the end of each successful navigation lifecycle, the router builds a tree of ActivatedRoute objects that make up the current state of the router. You can access the current RouterState from anywhere in the application using the Router service and the routerState property: access parameter via router.
  • #41: You can write and run Angular tests with a variety of tools and technologies. This guide describes specific choices that are known to work well.