Nivas Dhina Nivas Dhina - 1 year ago 95
Javascript Question

How to split the strings in angular js

I wanted to split a string and get the string in two parts.

for example:

i wish to split the string in the above url and store the string that is after the ? to a variable. How can i do that.

Answer Source
var str = "";
var res = str.split("?");
var value = res.slice(-1).pop(); // it will give 23457cedlske234cd
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download