What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2022-02-17 02:45:01
typescript ge t current screen resolution
import { Component, OnInit, OnDestroy, Input } from "@angular/core"; // Import this, and write at the top of your .ts file import { HostListener } from "@angular/core"; @Component({ selector: "app-login", templateUrl: '.... Add solution -
Javascript 2022-01-29 21:01:16
set width screen angular
@HostListener('window:resize', ['$event']) onResize(event?) { this.screenHeight = window.innerHeight; this.screenWidth = window.innerWidth; } //https://stackoverflow.com/questions/39888768/how-to-get-height-and-width-of-device-display-in-... Add solution -
Javascript 2021-11-12 18:06:14
change the focus to next in angular forms
import { Directive, ElementRef, HostListener, Input } from '@angular/core'; @Directive({ selector: '[moveNextByMaxLength]' }) export class MoveNextByMaxLengthDirective { constructor(private _el: ElementRef) { } @HostListener('keyup', ['$event']) onKeyD... Add solution -
TypeScript 2021-11-04 00:23:06
angular numbers only directive
import { Directive, ElementRef, HostListener, Input } from '@angular/core'; import { NgControl } from '@angular/forms'; @Directive({ selector: 'input[type=number], input[numbersOnly]' }) export class NumbersOnlyInputDirective { constructor(private e... Add solution -
Javascript 2021-10-25 18:33:12
mouse wheel event angular for table
import { Directive, ElementRef, HostListener} from "@angular/core"; import { MyService } from "./my-service"; @Directive({ selector: "[testDirec]" }) export class Test { private initPointX: number; private initPointY:... Add solution
Best helpers
Ranking is empty