Skip to content

Instantly share code, notes, and snippets.

@codef0rmer
Created February 26, 2019 18:00
Show Gist options
  • Save codef0rmer/650497c1a250f31f1640751ea50d13a2 to your computer and use it in GitHub Desktop.
Save codef0rmer/650497c1a250f31f1640751ea50d13a2 to your computer and use it in GitHub Desktop.
import {
Component,
ElementRef,
OnInit,
ViewChild
} from '@angular/core';
declare const $: any;
@Component({
selector: 'app-toolbar-men',
template: `
<div #el class="btn-toolbar btn-toolbar-info">
<i class="fa fa-heart"></i>
</div>
<ng-content></ng-content>
`
})
export class MenComponent implements OnInit {
@ViewChild('el', { read: ElementRef }) el;
ngOnInit() {
$(this.el.nativeElement).toolbar({
content: '#toolbar-men-options',
position: 'right'
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment