July 2017
Intermediate to advanced
454 pages
10h 1m
English
Next up, we have the tooltip directive, which allows us to display informative text at the left, right, top, or bottom of a given set of elements.
The tooltip directive is one of the simplest ones. Indeed, you only have to add two attributes to the element you wish to enhance: placement and ngbTooltip. The value of placement can be top, bottom, left, or right, while the value of ngbTooltip is the text you wish to display.
Let's modify the label for the movie_id field:
<ngb-alert [dismissible]="false" type="danger" *ngIf=!movieForm.valid>danger</ngb-alert><label >movie_id</label><ngb-alert [dismissible]="false" type="danger" *ngIf=!movieForm.controls.movie_id.valid>This field is required</ngb-alert> <input type="text" formControlName="movie_id" ...
Read now
Unlock full access