Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/bree7e/ngx-ipv4-helper
- Owner: bree7e
- Created: 2020-05-21T16:39:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T05:14:35.000Z (over 1 year ago)
- Last Synced: 2024-10-12T08:41:54.320Z (3 months ago)
- Topics: angular, angular2, input, ipv4, ipv4-address, typescript
- Language: TypeScript
- Homepage: https://bree7e.github.io/ngx-ipv4-helper/
- Size: 1.47 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
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`.