
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
ngx-query-params
Advanced tools
`ngx-query-param` is an Angular library that simplifies the manipulation of query parameters in the URL. It provides methods to add, delete, append, and check query parameters, making it easier to manage the URL's query string in your Angular applications
ngx-query-param
is an Angular library that simplifies the manipulation of query parameters in the URL. It provides methods to add, delete, append, and check query parameters, making it easier to manage the URL's query string in your Angular applications.
You can install ngx-query-params
using npm:
npm install ngx-query-params --save
Import the service in your module providers
import { NgxQueryParamService } from 'ngx-query-params';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule
],
providers: [NgxQueryParamService],
bootstrap: [AppComponent]
})
export class AppModule { }
Adds multiple query parameters to the URL. Accepts an object of parameter-value pairs.
addMultipleParamsInURL(params: object): void
Adds a single query parameter to the URL.
addParamInURL(param: string, value: string): void
Appends a query parameter to the existing URL's query string.
appendParamInURL(param: string, value: string): void
Removes query parameter from the URL.
removeParamFromURL(param: string): void
Returns an object containing all query parameters present in the URL.
getAllParamsFromURL(): string[]
Returns the value of a specific query parameter from the URL.
getParamFromURL(param: string): string
Checks if a specific query parameter exists in the URL.
hasParamInURL(param: string): boolean
import { Component, OnInit } from '@angular/core';
import { NgxQueryParamService } from 'ngx-query-params';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
constructor(private readonly ngxQueryParamService: NgxQueryParamService) {}
ngOnInit(): void {
const queryParams = {
param1: 'value1',
param2: 'value2',
};
this.ngxQueryParamService.addMultipleParamsInURL(queryParams);
this.ngxQueryParamService.addParamInURL('param', 'value');
this.ngxQueryParamService.appendParamInURL('param', 'value');
this.ngxQueryParamService.removeParamFromURL('param');
const allParams = this.ngxQueryParamService.getAllParamsFromURL('param');
const paramFromURL = this.ngxQueryParamService.getParamFromURL('param');
const hasParam = this.ngxQueryParamService.hasParamInURL('param');
}
}
FAQs
`ngx-query-param` is an Angular library that simplifies the manipulation of query parameters in the URL. It provides methods to add, delete, append, and check query parameters, making it easier to manage the URL's query string in your Angular applications
The npm package ngx-query-params receives a total of 0 weekly downloads. As such, ngx-query-params popularity was classified as not popular.
We found that ngx-query-params demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.