What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-18 15:46:03
nodejs interface
// MenuInterface.jsclass MenuInterface { constructor() { if(!this.getItems) { throw new Error("Menu's must have items!"); } }}// ---// file index.jsimport MenuInterface from './MenuInterface';class Menu extends MenuInterface { // n... 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 -
Javascript 2021-09-17 20:11:02
react convert excel to json
import React, { useState } from "react"; import "./App.css"; import * as XLSX from "xlsx"; class ExcelToJson extends React.Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(thi... Add solution -
Javascript 2021-09-17 12:26:02
calling angular component method in service
// ------------------------------------------------------------------------------------- // codes for component import { JustAService} from '../justAService.service'; @Component({ selector: 'app-cute-little', templateUrl: './cute-little.component.html... Add solution -
Javascript 2021-09-16 23:56:03
jquery like selector in javascript
var $ = (function () { 'use strict'; /** * Create the constructor * @param {String} selector The selector to use */ var Constructor = function (selector) { if (!selector) return; if (selector === 'document') { this.elems = [document]; ... Add solution -
Javascript 2021-09-16 19:51:02
add a route to a buttoin in angular
<button type="button" class="btn btn-primary-outline pull-right" (click)="btnClick();"><i class="fa fa-plus"></i> Add</button> // myComponent.component.ts file import { Router } from '@... Add solution
Best helpers
Ranking is empty