npm i ng-utils-pack
and
import { NgUtilsModule } from 'ng-utils-pack'
or
import { SingleElement } from 'ng-utils-pack'
Numerical formatter for input. Allowed: numbers (numpad to), space, '+', Ctrl+A, Ctrl+C, Ctrl+V, Ctrl+X, home, end, left and right.
Usage:
[OnlyNumber]="true"
Convert enumerator to array.
Usage:
*ngFor="let element of elements | enumToArray"
Return the date in the format provided. Parameters: string = date format.
Usage:
string | moment: 'DD/MM/YYYY'
Sort array in *ngFor. Parameters: string[] = properties to sort.
Usage:
*ngFor="let element of elements | orderBy: ['element.firstProperty', 'element.secondProperty']"
Return truncated string. Parameter: number = string length.
Usage:
string | truncate: 450
Abstract class for HttpClient Generic HttpClient service
Usage:
@Injectable()
export class AppService extends HttpClientBase {
constructor(
private http: HttpClient) {
super(http, environment.apiBaseUrl);
}
getExamples(): Observable<any[]> {
return this.invoke('GET', 'api/exaples', {});
}
}
Rounded animated progress bar