Home > Net >  What does "pane" mean in Example of Angular ContentChild referecens?
What does "pane" mean in Example of Angular ContentChild referecens?

Time:03-18

In the reference: API > @angular/core > ContentChild

The below is the snippet of example code.

@Component({
  selector: 'example-app',
  template: `
    <tab>
      <pane id="1" *ngIf="shouldShow"></pane>
      <pane id="2" *ngIf="!shouldShow"></pane>
    </tab>

    <button (click)="toggle()">Toggle</button>
  `,
})

What does "pane" in the line mean?

<pane id="1" *ngIf="shouldShow"></pane>

I suspect some definition is missing in this example.

CodePudding user response:

It's a custom directive only used in that example. You can see it in the following link:

https://angular.io/api/core/ContentChild#example

CodePudding user response:

Here, the "pane" tag is a Directive, it's a wrapper for some logic

Come to think of Directives as "Components without templates"

  • Related