Solved

How to retrieve query string values from url in Angular JS

Posted on 2016-09-17
4
27 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
  • 2
  • 2
4 Comments
 
LVL 27

Assisted Solution

by:BigRat
BigRat earned 500 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 500 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

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…
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now