Pawel Kozlowski (@pkozlowski_os)
<div uib-tooltip="exp">
<div uib-tooltip="{{exp}}">
<div uib-tooltip="Static text">
<div uib-tooltip="...">
<div uibTooltip="...">
<div [ngbTooltip]="exp">
<div ngbTooltip="Static text">
<uib-tabset>
<uib-tab title="Simple">Some simple text</uib-tab>
<uib-tab title="Expensive stuff">
<very-expensive-stuff></very-expensive-stuff>
</uib-tab>
</uib-tabset>
<ngb-tabset>
<ngb-tab title="Simple">
<template ngbTabContent>Some simple text</template>
</ngb-tab>
<ngb-tab title="Expensive stuff">
<template ngbTabContent>
<very-expensive-stuff></<very-expensive-stuff>
</template>
</ngb-tab>
</ngb-tabset>
@Component({
template: `
<ul [class]="'nav nav-' + type" role="tablist">
<li class="nav-item" *ngFor="let tab of tabs">...</li>
</ul>
<div class="tab-content">
<template ngFor let-tab [ngForOf]="tabs">
...
</template>
</div>`
})
export class NgbTabset implements AfterContentChecked {
@ContentChildren(NgbTab) tabs: QueryList<NgbTab>;
...
}
<button ngbTooltip="Hint!">
I've got a tip!
</button>
@Directive({selector: '[ngbTooltip]', exportAs: 'ngbTooltip'})
export class NgbTooltip implements OnInit, OnDestroy
toggle(): void {
...
}
}
<button ngbTooltip="Hint!" #t="ngbTooltip" (click)="t.toggle()">
I've got a tip!
</button>
@Component({
selector: '[ngbDatepickerNavigation]',
styles: [`
td {
text-align: center;
padding-bottom: 0.25rem;
}
`],
...
})
export class NgbDatepickerNavigation {
..
}
<input [(ngModel)]="state" [ngbTypeahead]="findState" />
findState = (userInput$: Observable<string>) => userInput$
.filter(term => term.length > 2)
.debounceTime(200)
.distinctUntilChanged()
.map(term => new RegExp(term, 'gi').test(state));
ngZone.onStable
ngZone.onStable.subscribe(() => {
if (this._isPopoverOpen()) {
positionElements(
this._elementRef.nativeElement,
this._windowRef.location.nativeElement,
this.placement);
}
});
(keyup.arrowLeft)="previousSlide()"
(document:click)="closeOthers($vent)"
[class.active]="isOpen(panel.id)"
@Component({
selector: 'ngb-pagination',
changeDetection: ChangeDetectionStrategy.OnPush,
template: `...`
})
export class NgbPagination implements OnChanges {
...
}
PresentationRef