Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to retrieve query string values from url in Angular JS

Posted on 2016-09-17
4
Medium Priority
?
48 Views
Last Modified: 2016-09-24
Hi,
I am trying to get the query string parameter values from url in Angular JS. 4location.search().parametername is not working.
Can I get any simple to understand example.

Thanks
0
Comment
Question by:KavyaVS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 27

Assisted Solution

by:BigRat
BigRat earned 2000 total points
ID: 41803116
Where? Is this server side or in an HTML page which when loaded uses Angular?
0
 

Author Comment

by:KavyaVS
ID: 41803688
In an Html page  when loaded using Angular. Thanks
0
 
LVL 27

Accepted Solution

by:
BigRat earned 2000 total points
ID: 41813656
I'm really sorry for having being so busy this week that I forgot all about you. Give youself the points.

The service you need to inject is $location. The method search() will return a Javascript object with the parameters of the URL.

https://docs.angularjs.org/api/ng/service/$location

HTH
0
 

Author Closing Comment

by:KavyaVS
ID: 41814109
Thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

598 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question