import {Component, ViewContainerRef} from '@angular/core'
//noinspection TypeScriptCheckImport
import {
elementVisible,
computedStyle,
scrollTo,
outerHeight,
outerWidth
} from 'ng2-utils';
@Component({
selector: 'my-app',
template: `
#hello
myHtml: {{myHtml}}
myHtml | htmlCode:
{{myHtml | htmlCode}}
myHtml | htmlCode:'include' :
{{myHtml | htmlCode:'include'}}
myHtml | htmlCode:'ng2-utils-11' :
{{myHtml | htmlCode:'ng2-utils-11'}}
myHtml | htmlCode:'-include'
{{myHtml | htmlCode:'-include'}}
ngOnInit | jsCode:
{{ngOnInit | jsCode}}
1
2
3
4
5
`
})
export class AppComponent {
el: HTMLElement;
resp: any = {};
elementVisible: any = elementVisible;
computedStyle: any = computedStyle;
outerHeight: any = outerHeight;
outerWidth: any = outerWidth;
myHtml = `
I
ng2-utils-11
E
`;
scrollToResult: boolean;
ngOnInit() {
scrollTo('#hello', 'body');
this.scrollToResult = true;
}
}