| 12345678910111213141516171819202122232425262728 |
- import { Directive, forwardRef, Input, AfterViewInit, ElementRef, ViewContainerRef } from '@angular/core';
- import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
- import { C3Tooltip } from './c3-tooltip.component';
-
- export const MAT_AUTOCOMPLETE_VALUE_ACCESSOR: any = {
- provide: NG_VALUE_ACCESSOR,
- useExisting: forwardRef(() => C3TooltipTrigger),
- multi: true
- };
-
- @Directive({
- selector: 'button[c3Tooltip]',
- exportAs: 'c3TooltipTrigger',
- providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR]
- })
- export class C3TooltipTrigger implements AfterViewInit {
- @Input('c3Tooltip') tooltip: C3Tooltip;
-
- constructor(
- private _element: ElementRef<HTMLInputElement>,
- // private _overlay: Overlay,
- private _viewContainerRef: ViewContainerRef) {
- }
-
- ngAfterViewInit() {
- console.log(this.tooltip.template)
- }
- }
|