angular-window-component

Window Component for Angular

Stats

StarsIssuesVersionUpdatedCreatedSize
angular-window-component
030.3.64 years ago4 years agoMinified + gzip package size for angular-window-component in KB

Readme

Angular Window Component

Build Status npm version dependencies Status devDependencies Status

Angular Window provides a basic window component for your application. I know it's not used in web projects, but if you ever come to need this, it's here.

Documentation

Live demo

Installation

To install this library, run:

$ npm install angular-window-component --save

Using window component

Once you have installed it, you can import it in any Angular application by running:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import the library
import { WcWindowModule } from 'angular-window-component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,

    // Specify it as an import
    WcWindowModule.forRoot()
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once your library is imported, you can use its component and directives in your Angular application:

<!-- You can now use window component in app.component.html -->
<wc-window>
  <wc-window-title>Window Title</wc-window-title>
  <wc-window-content>
    <!-- You can put anything you want here -->
    <h1>
      {{title}}
    </h1>
  </wc-window-content>
  <wc-window-footer>Window Footer</wc-window-footer>
</wc-window>

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

License

MIT © Emerson Jair

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.