Skip to content

Instantly share code, notes, and snippets.

@somq
Created March 18, 2018 14:59
Show Gist options
  • Save somq/82192ebd857e22d6c5ebdd067fb92ed0 to your computer and use it in GitHub Desktop.
Save somq/82192ebd857e22d6c5ebdd067fb92ed0 to your computer and use it in GitHub Desktop.
import { Component, OnInit, Input, EventEmitter, Output, NgModule } from '@angular/core';
@Component({
selector: 'button-view',
template: `
<button type="button" class="btn btn-outline-secondary" ngbPopover="You see, I show up on hover!" triggers="mouseenter:mouseleave" popoverTitle="Pop title">
{{ value }}
</button>
`,
})
@NgModule()
export class STPopoverViewComponent implements OnInit {
renderValue: string;
@Input() value: string | number;
@Input() rowData: any;
@Output() save: EventEmitter<any> = new EventEmitter();
ngOnInit() {
// this.renderValue = this.value.toString().toUpperCase();
}
onClick() {
this.save.emit(this.rowData);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment