?
Solved

How to retrieve query string values from url in Angular JS

Posted on 2016-09-17
4
Medium Priority
?
43 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

How To Install Bash on Windows 10

Windows’ budding partnership with Canonical has certainly led to some great improvements. One of them being the ability to use Bash on your Windows machine without third party applications! This might be one of the greatest things a cloud engineer in a Windows environment can do!

Question has a verified solution.

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

You have this traditional web application that refreshes the whole page each time you navigate and you think it's a good time to convert it to a Single-Page approach. What should you know in advance? Read on, I'll guide you through it.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

770 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