Find URL GET Params in Angular 1.x

Last modified: 
Monday, July 2nd, 2018

An example of using the $location service Angular 1.x to get query parameter values.

const search = $location.search(); //=> {param1:"value1", param2:"value2"}
const param1 = search.param1;     //=> value1

const param2 = $location.search().param2; //=> value2


The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.