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-30 17:51:43
special charecters Parameters is not getting passed from angular to Web API in the get call
import { HttpParameterCodec } from '@angular/common/http';export class CustomHttpParamEncoder implements HttpParameterCodec { encodeKey(key: string): string { return encodeURIComponent(key); } encodeValue(value: string): string { return encodeURI... Add solution -
TypeScript 2022-01-30 02:50:13
countdown timer angular
// Iinstall the timer package from NPM $ npm install angular-countdown-timer --save // Import the countdown timer module import { NgModule } from '@angular/core'; import { CountdownTimerModule } from 'angular-countdown-timer'; @NgModule({ imports: [ ... Add solution -
Javascript 2022-01-29 13:41:19
interceptor error handling angular 9
import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpErrorResponse } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; import { catchError } from 'rxjs/operators'; export class HttpErrorInterceptor implements HttpIn... Add solution -
Other 2022-01-29 04:15:02
run antlr
$ cd /usr/local/lib $ sudo curl -O https://www.antlr.org/download/antlr-4.9.2-complete.jar $ export CLASSPATH=".:/usr/local/lib/antlr-4.9.2-complete.jar:$CLASSPATH" $ alias antlr4='java -jar /usr/local/lib/antlr-4.9.2-complete.jar' $ alias grun=... Add solution -
Javascript 2022-01-28 15:56:01
locale data angular 12
... import { NgModule, LOCALE_ID } from '@angular/core'; import { registerLocaleData } from '@angular/common'; import localeFr from '@angular/common/locales/fr'; registerLocaleData(localeFr); @NgModule({ imports: [...], declarations: [...], bootst... Add solution -
Other 2022-01-26 18:30:24
angular lazy loading
import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; const routes: Routes = [ { path: 'dashboard', loadChildren: () => import('./modules/dashboard/dashboard.module').then(m => m.DashboardModule... Add solution -
Javascript 2022-01-26 06:50:47
nestjs controller
import { Controller, Get, Post, Body } from '@nestjs/common'; import { CreateCatDto } from './dto/create-cat.dto'; import { CatsService } from './cats.service'; import { Cat } from './interfaces/cat.interface'; @Controller('cats') export class CatsContr... Add solution -
Javascript 2022-01-26 05:55:47
how to redirect from login page to other page if user is already logged in in angular using jwt
const ROUTES = [ { path: '', redirectTo: 'home', pathMatch: 'full' }, { path: 'login', component: LoginComponent }, { path: 'register', component: RegisterComponent }, { path: 'home', component: HomeComponent }, { path: 'books', component: BookC... Add solution