I am thinking that you are asking for get request in angular and process
api  and get JSON data if that so,

a simple solution is :
go to app.componet.ts file and paste this

import {HttpClient} from '@angular/common/http';

export class AppComponent {

    ToDos: string[];

    constructor(private httpService: HttpClient) { }
        ngOnInit() {
            this.httpService.get( '
https://jsonplaceholder.typicode.com/photos
<https://www.google.com/url?q=https://jsonplaceholder.typicode.com/photos&sa=D&source=hangouts&ust=1555004462735000&usg=AFQjCNFEKLu_yi62dtkoBT15Q1661xSWRQ>'
).subscribe(
            data => {
            this.ToDos = data as string [];
            console.log(this.ToDos)
           } );
     }
}

and now go to the html page and
call ToDos
<p>{{ ToDos | json}}

now process your URL to that

Efficient one means use ng service and use that in the component file

*Regards*
*Nikhilesh Reddy.P
<http://www.linkedin.com/in/nikhilesh-reddy-1800a1114?trk>*



On Wed, Apr 10, 2019 at 1:19 AM Dev C <chauhan.dev...@gmail.com> wrote:

> I need more like api based.
>
> On Tuesday, April 9, 2019, Tito <yosi...@gmail.com> wrote:
>
>>
>> http://jasonwatmore.com/post/2016/01/31/angularjs-pagination-example-with-logic-like-google
>>
>>
>>
>> On Tuesday, April 9, 2019 at 9:07:45 AM UTC-7, Dev C wrote:
>>>
>>> I have An Api which returns the data with pager object like page number
>>> and page size, everytime i click on pagination control it should goto
>>> server and retrieve data based on page i click, so in parameter i will
>>> always send http: domain/Api/v1/pagination?pagenumber=1&page size=10
>>>
>>> Please help if anybody has such example to refer.
>>>
>>>
>>> --
>>> Sent from my mi note 4 phone.
>>>
>> --
>> 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 angular+unsubscr...@googlegroups.com.
>> To post to this group, send email to angular@googlegroups.com.
>> Visit this group at https://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Sent from my mi note 4 phone.
>
> --
> 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 angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> 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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to