sorry req is from the parms of a function called from an api route

function getDepartment(req, res, next) {
var payload = req.params;

console.log('payload', payload);

On Tuesday, September 11, 2018 at 1:47:17 AM UTC-7, jaffer sadiq wrote:
>
> Dear tio,
>
> Is this correct one??  How it works??
>
> What is req???? it prompt error :  Req is not defined
>
> Thanks
>
> On Mon, Sep 10, 2018 at 4:42 PM Tito <[email protected] <javascript:>> 
> wrote:
>
>> what api verb is this for?
>> assume it is a GET?
>>
>> var payload = req.params;
>>
>> console.log('payload', payload);
>>
>> var id= payload.id; 
>> var cnmae = payload.cnmae ;
>>
>> On Monday, September 10, 2018 at 3:34:06 AM UTC-7, jaffer sadiq wrote:
>>>
>>> Hi,
>>>
>>> I need to get url parameter as value in angular js. Am new to angular JS
>>>
>>> url : 
>>> *http://localhost:52073/TransRecord/ShowTransRecord?id=%22262115537004%22&cnmae=%22Demo%20Customer%22
>>>  
>>> <http://localhost:52073/TransRecord/ShowTransRecord?id=%22262115537004%22&cnmae=%22Demo%20Customer%22>*
>>>
>>> I need id value = *22262115537004*, cnmae value =   *Demo **Customer*. 
>>> I tried with location.url. but don't know how to get exact  parameter value
>>>
>>> Thanks in advance
>>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> 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.

Reply via email to