Книга: Angular 2 Cookbook
Назад: Downgrade Angular 2 providers to Angular 1 services with downgradeInjectable
Дальше: Using decorators to build and style a simple component

Chapter 2. Conquering Components and Directives

Your objective is to iterate through this and display the article title only if it is set as active. This chapter will cover the following recipes:

  • Using decorators to build and style a simple component
  • Passing members from a parent component to a child component
  • Binding to native element attributes
  • Registering handlers on native browser events
  • Generating and capturing custom events using EventEmitter
  • Attaching behavior to DOM elements with Directives
  • Projecting nested content using ngContent
  • Using ngFor and ngIf structural directives for model-based DOM control
  • Referencing elements using template variables
  • Attribute property binding
  • Utilizing component life cycle hooks
  • Referencing a parent component from a child component
  • Configuring mutual parent-child awareness with ViewChild and forwardRef
  • Configuring mutual parent-child awareness with ContentChild and forwardRef

Introduction

Directives as you came to know them in Angular 1 have been done away with. In their place, we have two new entities: components and the new version of directives. Angular 2 applications are now component-driven; with further exposure, you will discover why this style is superior.

Much of the syntax is entirely new and may seem strange at first. Fear not! The underpinnings of the Angular 2 style are elegant and marvelous once completely understood.

Назад: Downgrade Angular 2 providers to Angular 1 services with downgradeInjectable
Дальше: Using decorators to build and style a simple component

thank you
Flame
cant read the code since it is all on a single line. Also this comments section is russian
Rakuneque
DATA COLLECTION AND ANALYSIS Two reviewers extracted data and assessed methodological quality independently lasix torsemide conversion Many others were in that space already