How do I get data from web api in angularjs 7?



How do I get data from web api in angularjs 7?..

Answer / Rashmi Verma

You can use Angular's HttpClient module to make HTTP requests and retrieve data from a Web API in AngularJS 7. Here's an example: `import { HttpClient } from '@angular/common/http';nconstructor(private http: HttpClient) { } ngetData() { return this.http.get('api-url'); }`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

Explain basic steps to set up an angular js app?

1 Answers  


What is the traceur compiler?

1 Answers  


What is elementref?

1 Answers  


How can you create a decorator in angular?

1 Answers  


Explain ngif directive ?

1 Answers  


How many scope can an application have?

1 Answers  


What is factory method?

1 Answers  


What is ngoninit ()?

1 Answers  


What is polyfill in angular?

1 Answers  


What is pipes?

1 Answers  


What is rxjs?

1 Answers  


What are the difference between @inject and @injectable?

1 Answers  


Categories