@angular/material/tooltip#MAT_TOOLTIP_DEFAULT_OPTIONS TypeScript Examples

The following examples show how to use @angular/material/tooltip#MAT_TOOLTIP_DEFAULT_OPTIONS. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: more-info.component.ts    From bitcoin-s-ts with MIT License 6 votes vote down vote up
@Component({
  selector: 'app-more-info',
  templateUrl: './more-info.component.html',
  styleUrls: ['./more-info.component.scss'],
  providers: [
    { provide: MAT_TOOLTIP_DEFAULT_OPTIONS, useValue: myCustomTooltipDefaults }
  ],
})
export class MoreInfoComponent {

  _tooltip: string = ''
  @Input()
  set tooltip(value: string) {
    this._tooltip = this.translate.instant(value)
  }

  constructor(private translate: TranslateService) { }

}
Example #2
Source File: more-info.component.ts    From bitcoin-s-ts with MIT License 6 votes vote down vote up
@Component({
  selector: 'app-more-info',
  templateUrl: './more-info.component.html',
  styleUrls: ['./more-info.component.scss'],
  providers: [
    { provide: MAT_TOOLTIP_DEFAULT_OPTIONS, useValue: myCustomTooltipDefaults }
  ],
})
export class MoreInfoComponent {

  _tooltip: string = ''
  @Input()
  set tooltip(value: string) {
    this._tooltip = this.translate.instant(value)
  }

  // _params: any = null
  // @Input()
  // set params(value: any) {
  //   this._params = this.translate.instant(value)
  //   // Best way to handle?
  //   this._tooltip = this.translate.instant(this._tooltip, this._tooltip)
  // }

  constructor(private translate: TranslateService) { }

}
Example #3
Source File: json-schema-form.module.ts    From json-schema-form with Apache License 2.0 6 votes vote down vote up
@NgModule({
  declarations: [JsonSchemaFormComponent, EditElementDialogComponent, WidgetDirective],
  imports: [
    MatCardModule,
    FlexLayoutModule,
    MatIconModule,
    MatTooltipModule,
    MatTableModule,
    MatTabsModule,
    MatFormFieldModule,
    MatSelectModule,
    MatDatepickerModule,
    MatCheckboxModule,
    MatAutocompleteModule,
    HttpClientModule,
    CommonModule,
    MatInputModule,
    MatNativeDateModule,
    MatButtonModule,
    MatExpansionModule,
    MatMenuModule,
    ReactiveFormsModule,
    MatDialogModule,
    MatChipsModule,
    DragDropModule
  ],
  exports: [JsonSchemaFormComponent],
  providers: [
    // turn off tooltip gestures on mobile: https://github.com/angular/components/issues/4892
    { provide: MAT_TOOLTIP_DEFAULT_OPTIONS, useValue: { touchGestures: 'off' } },
    { provide: EDIT_DIALOG_TOKEN, useValue: EditElementDialogComponent }
  ]

})
export class JsonSchemaFormModule { }