Hi everyone.
I done with the script. added my script as well
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : sParameterName[1];
}
}
};
//===In your Case Example
var id=getUrlParameter('id');
var cnmae =getUrlParameter('cnmae');
Thanks for everyone response!!
On Thu, Sep 13, 2018 at 6:33 AM Sander Elias <[email protected]> wrote:
> Hi Jaffer,
>
> Hmm, I just realized you were asking for AngularJS. There is some support
> in there for URL parsing, but you are better served with the standard URL
> handler <https://developer.mozilla.org/en-US/docs/Web/API/URL>.
>
> Something like this will probably do:
>
> const x = new URL('
> http://localhost:52073/TransRecord/ShowTransRecord?id=%22262115537004%22&cnmae=%22Demo%20Customer%22
> ')
>
> console.log(x.searchParams.get('id'))
>
>
> Hope this helps you a bit,
> Regards
> Sander
>
> --
> You received this message because you are subscribed to the Google Groups
> "Angular and AngularJS discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.