0.0.5 • Published 7 years ago

ng-util v0.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

ng-util v0.0.5

Site | Docs | Wiki

The ng-util library export lots of utility functions which you need in your day-to-day angular app development. Our main intent is to make developer life easy by saving lots of time which we spent on googling and finding the right code or reinventing the wheel.

Installation

$ npm instal ng-util

Usage

import { Component } from '@angular/core';
import { StringUtilService } from 'ng-util';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
  providers:[StringUtilService]
})
export class AppComponent {
  query: string;
  title = 'app';


  constructor(private strUtil: StringUtilService) {
    this.query = this.strUtil.jsonToQueryString({
      id: 10,
      name: 'tom'
    });
  }
}
<h2>Query:{{ query }}! </h2>

Output:

Query: ?id=10&name=tom