The WindowModule contains a window provider service to inject the browser’s native window object into a component. It's actually based on Brian Love's Angular Window Provider, so you can find more information in the article he wrote about it.
import { WindowModule } from '@acpaas-ui/ngx-utils';
Visit our documentation site for full how-to docs and guidelines
import { WindowModule, WINDOW_PROVIDERS } from '@acpaas-ui/ngx-utils';
@NgModule({
imports: [
WindowModule
],
providers: [WINDOW_PROVIDERS],
});
export class AppModule {};
import { WINDOW } from '@acpaas-ui/ngx-utils';
constructor(
@Inject(WINDOW) public window
) {}
<dl>
<dt>Height:</dt>
<dd><pre>{{ window.innerHeight }}</pre></dd>
<dt>Width:</dt>
<dd><pre>{{ window.innerWidth }}</pre></dd>
</dl>
Visit our Contribution Guidelines for more information on how to contribute.