I have an URL link to this.
http://localhost:4200/tab/event/eventcard?id=recV364lxjTat9lBQ
I need to get tab/event/eventcard and recV364lxjTat9lBQ separately from angular. can anyone help?
I have fixed this problem using this code snippet.
parameters = new URL(your_URL_here);
Related
I have an issue on where i cannot get the parameters to pass through via url.
Below is the url to the report i want to pass a single ID parameter (#ID).
I have tried a few ways, first time in passing via URL.
Any help grateful.
http://rpt.Server.local/Reports/Pages/Report.aspx?ItemPath=%2f%5bQuality+Sales+Report%5d%2fCP+Quailty+Sales+Details+Report+Preview&ViewMode=Detail
http://rpt.Server.local/Reports/Pages/Report.aspx?ItemPath=%2f%5bQuality+Sales+Report%5d%2fCP+Quailty+Sales+Details+Report+Preview&ViewMode=Detail
instead of above link try below
Go to http://rpt.Server.local/Reportserver
find your report in above link and pass "&ID=(value) at the end of the url
or
http://rpt.Server.local/Reportserver/Pages/Report.aspx?ItemPath=%2f%5bQuality+Sales+Report%5d%2fCP+Quailty+Sales+Details+Report+Preview&ID=(value)
I am using drupal 6.
my URL is http://myurl.net/fr/node/433/post.
I need to get http://myurl.net/fr through code.
through global $base_url i am not able to get.
Please can anyone help me in this.
You can user $_SERVER variable, it not depends on Drupal.
$url = "http://$_SERVER[HTTP_HOST]";
Ok, let me rephrase my question.
I have a website set up with URL in "path" format, and the api function works well.
Now I need to change only the URL of the api part in "get" format.
For example,
http://localhost/api/query/data?data=100294832
http://localhost/api/data/100294832
works.
api is a controller, data is a model. I have this in my main.conf,
array('api/view', 'pattern'=>'api/<model:\w+>/<id:\d+>', 'verb'=>'GET'),
How could I do this? Should I create an action in api called query, and moved view function code there?
Thanks a lot!
The URL http://localhost/api/data/100294832 is the same as http://localhost/api/data/?id=100294832 by your route rule. It will work by default.
I want to pass a variable in my URL but not show it in the URL for SEO purposes
e.g www.mywebsite.com/Search?city=NYC should looks like www.mywebsite.com/Search and still be able to retrieve the value of "city" on the page.
Thanks
Simply use a POST request and you're done. However, is a common pratice to use GET request for search forms because the user can bookmark the url. Using POST, this isn't possible.
I just used Rewrite rules to accomplish this.
I am new to Grails/Groovy. Please bear with me if this is a silly question.
I am trying to map an URL having querystring parameters in urlmapping.groovy, something like,
"/rest/employees?empno=123&dept=delivery"(controller:"employees", action="emp")
The values 123 and delivery are dynamic values. In other words, this could be anything that the user can use.
Apparently this syntax is not correct. What is the right way to achieve this?
Just leave /rest/employees"(controller:"employees", action="emp") and you'll get your query parameters as params.empno and params.dept in your action
#splix answer is correct. If you want to use a restfull url, you could do something like
"/rest/employees/$empno/$dept"
instead. Otherwise just leave out the part after "?" as said. In your controller you will still get params.empno and params.dept
Read more here