@angeeks/fullscreen
v0.0.1
Published
A wrapper of sindresorhus/screenfull.js for Angular.
Downloads
6
Readme
Fullscreen
A wrapper of screenfull for Angular.
Installation
npm i -P @angeeks/fullscreen
Usage
// app.module.ts
+import { FullscreenModule } from '@angeeks/fullscreen';
@NgModule({
imports: [
+ FullscreenModule
]
})
export class AppComponent {}
// trigger by service
// app.component.ts
import { Fullscreen } from '@angeeks/fullscreen';
class AppComponent {
- constructor() {}
+ constructor(private fullscreen: Fullscreen) {}
+ click(e) {
+ this.fullscreen.toggle(e.target);
+ }
}
// TODO: trigger by directive