Skip to content

Instantly share code, notes, and snippets.

@lalogrosz
lalogrosz / cloudSettings
Last active May 2, 2021 18:58
vscode settings
{"lastUpload":"2020-12-04T14:14:05.086Z","extensionVersion":"v3.4.3"}
@lalogrosz
lalogrosz / input-number.ts
Last active November 7, 2017 12:49
Angular Numeric Directive Validation
import { Directive, HostListener, ElementRef } from '@angular/core';
@Directive({
selector: '[inputNumber]'
})
export class InputNumberDirective {
constructor(private element: ElementRef) {}
@HostListener('keypress', ['$event'])
public onInput(event) {
@lalogrosz
lalogrosz / ucwords.ts
Created August 11, 2017 16:41
Angular ucwords Pipe
import { Injectable, Pipe } from '@angular/core';
@Pipe({
name: 'ucwords'
})
@Injectable()
export class UcwordsPipe {
/*
Takes a value and makes it lowercase.
*/