Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bree7e/ngx-ipv4-helper

An angular directive to help input ipv4 address
https://github.com/bree7e/ngx-ipv4-helper

angular angular2 input ipv4 ipv4-address typescript

Last synced: about 2 months ago
JSON representation

An angular directive to help input ipv4 address

Awesome Lists containing this project

README

        

# ngx-ipv4-helper

An angular directive to help input ipv4 address

[Demo application](https://bree7e.github.io/ngx-ipv4-helper/)

## Installation

To install this library, run:

```bash
$ npm install ngx-ipv4-helper --save
```

and then import module:

```typescript
import { BrowserModule } from "@angular/platform-browser";
import { NgModule } from "@angular/core";

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

import { NgxIpv4HelperModule } from "ngx-ipv4-helper"; // <===

@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
NgxIpv4HelperModule, // <===
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
```

## Usage

`ngxIpv4Helper` should place on input with `ngControl`

Template form

```html

```

Reactive form

```html

```

```ts
ip = new FormControl("");
```

## Build

Run `ng build ngx-ipv4-helper --prod` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build ngx-ipv4-helper`, go to the dist folder `cd dist/ngx-ipv4-helper` and run `npm publish`.