What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2022-01-31 21:11:07
How to implement Bootstrap 4 for Angular 2 ngb-pagination
export class HomeComponent implements OnInit { currentPage = 1; itemsPerPage = 5; pageSize: number; constructor() { } public onPageChange(pageNum: number): void { this.pageSize = this.itemsPerPage*(pageNum - 1); } public changePagesize(nu... Add solution -
Javascript 2022-01-22 01:22:02
passing a variable to the width style div angular
@Component({ selector: '[sidebar]', templateUrl: 'app/Nav/sidebar.comp.html', host: { '[style.height.px]':'0.9 * height', '[style.width.px]':'0.21 * width' } }) export class SidebarComp { width: number; height: number; const... Add solution -
Javascript 2021-11-20 20:33:14
react chart js 2 api data
import React, { Component } from 'react'; import './App.css'; import axios from 'axios' import Chart from './components/Chart'; class App extends Component { constructor(){ super(); this.state = { chartData:{} } } componentDidMou... Add solution -
Other 2021-11-19 07:11:19
uniswap liquidity provider demo dapp
pragma solidity 0.7.1; import "https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/IUniswapV2Router02.sol"; contract UniswapExample { address internal constant UNISWAP_ROUTER_ADDRESS = 0x7a250d5630B4cF539739dF2C5... Add solution -
Javascript 2021-11-16 09:18:38
how to shallow clone javascript class
class myClass { constructor() { this.str = "String"; //Defining a string this.number = 3; //Defining a number } } var classReference = new myClass(); //Making new instance of class var myObjectToCopy; function copyClass() { myObj... Add solution -
Javascript 2021-11-15 09:26:54
angular http error handling
// src/app/services/interceptor.service.ts import { Injectable } from '@angular/core'; import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpErrorResponse } from '@angular/common/http'; import { Observable, throwEr... Add solution -
Javascript 2021-11-14 22:36:13
console log update status bar
const { bgWhite } = require("chalk"); module.exports = class ProgressBar { constructor() { this.total; this.current; this.bar_length = process.stdout.columns - 30; } init(total) { this.total = total; this.current = 0; this.updat... Add solution
Best helpers
+10
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5