A wrapper of screenfull for Angular.
npm i -P @angeeks/fullscreen
// 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