Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Expert Angular

You're reading from   Expert Angular Build deep understanding of Angular to set you apart from the developer crowd

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781785880230
Length 454 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Sridhar Rao Chivukula Sridhar Rao Chivukula
Author Profile Icon Sridhar Rao Chivukula
Sridhar Rao Chivukula
Mathieu Nayrolles Mathieu Nayrolles
Author Profile Icon Mathieu Nayrolles
Mathieu Nayrolles
Alexandru Vasile Pop Alexandru Vasile Pop
Author Profile Icon Alexandru Vasile Pop
Alexandru Vasile Pop
Rajesh Gunasundaram Rajesh Gunasundaram
Author Profile Icon Rajesh Gunasundaram
Rajesh Gunasundaram
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Architectural Overview and Building a Simple App in Angular 2. Migrating AngularJS App to Angular App FREE CHAPTER 3. Using Angular CLI to Generate Angular Apps with Best Practices 4. Working with Components 5. Implementing Angular Routing and Navigation 6. Creating Directives and Implementing Change Detection 7. Asynchronous Programming Using Observables 8. Template and Data Binding Syntax 9. Advanced Forms in Angular 10. Material Design in Angular 11. Implementing Angular Pipes 12. Implementing Angular Services 13. Applying Dependency Injection 14. Handling Angular Animation 15. Integrating Bootstrap with Angular Application 16. Testing Angular Apps Using Jasmine and Protractor Frameworks 17. Design Patterns in Angular

Structural Directives

As the name mentions, Structural Directives alter the DOM structure by adding, appending, or removing DOM elements on the fly.

Angular Structural Directives are displayed with an (*) asterisk symbol before the directive name.

Some of the commonly used Structural Directives are as follows:

  • ngFor: Repeater directive generally used to loop through and display a list of elements.
  • ngIf: Shows or hides DOM elements depending on the result of expression evaluation; the result is either true or false.
  • ngSwitch: Returns if the match expression value matches the value of the switch expression. The result returned can be any value; a conditional check is done for matching values.
Only one Structural Directive is allowed per element.

Let's learn about each of these Structural Directives in detail and create few examples using them:

...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime