Created
February 26, 2019 18:00
-
-
Save codef0rmer/650497c1a250f31f1640751ea50d13a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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