What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-15 08:25:14
angular stoppropagatio
import {Directive, HostListener} from "@angular/core"; @Directive({ selector: "[click-stop-propagation]" }) export class ClickStopPropagation { @HostListener("click", ["$event"]) public onClick(event: a... Add solution -
Html 2021-10-03 19:38:06
angular adding [routerLink] as a part of dynamic html
routerLink cannot be added after the content is already rendered but you can still achieve the desired result: Create a href with dynamic data and give it a class: `<a class="routerlink" href="${someDynamicUrl}">${someDynamicVa... Add solution -
Javascript 2021-09-18 09:26:03
angular format phone number while typing
export class PhoneMaskDirective { constructor(public ngControl: NgControl) { } @HostListener('ngModelChange', ['$event']) onModelChange(event) { this.onInputChange(event, false); } @HostListener('keydown.backspace', ['$event']) keydownB... Add solution -
Other 2021-09-08 14:08:02
Back button directive Angular
/** Navigation service ***/ import { Injectable } from '@angular/core' import { Location } from '@angular/common' import { Router, NavigationEnd } from '@angular/router' @Injectable({ providedIn: 'root' }) export class NavigationService { private hist... Add solution
Best helpers
Ranking is empty