UrbanPro

Learn Angular.JS from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Why do we have to import Http in a service even if we import it in application module?

Asked by Last Modified  

Follow 1
Answer

Please enter your answer

Angular 2+ Developer And Trainer

Let's ask ourselves what a Service is ? Well under the hood, just a glorified module which exposes a few classes that you import in your component via the normal import - import { Http, Response, RequestOptions, Headers } from '@angular/http'; However this is more like injecting the service....
read more
Let's ask ourselves what a Service is ? Well under the hood, just a glorified module which exposes a few classes that you import in your component via the normal import - import { Http, Response, RequestOptions, Headers } from '@angular/http'; However this is more like injecting the service. What about registering it? So we start with a normal import into the module . But then you don't see an entry into the providers in the module. Reason being that the provider configuration for Http isn’t so straight forward, so the Angular team have given us a handy way to configure our NgModule with all the required providers for Http and that is adding to the imports section. Importing HttpModule into our NgModule configures our NgModules injector with all the providers needed to use Http in our app. So to summarize the first import is registering and the second is injecting. read less
Comments

Related Questions

Hi, can you explain about Angular JS training and project explanation on it?
If you like I could give you sessions on Angular Js and guide you on the same to build client side applications.
Kiranteja
job opportunities after doing an hands on training for angular.js at kolkata
AngularJS is high in demand if You have good hands on it.
Subhadeep
How Nodejs and Angular Work together?
If you need to connect Angular js With node js . you should use express js as middle ware.
Raminder
What is cost of final year IEEE project guidance?
It cost around Rs. 20,000/- at max.
Vivek
Hi, I am pursuing MBA 1st Year. I want to learn Digital Marketing. Is it right for career growth, or should I choose to learn some other technologies? If yes, please give me your suggestions that help me to get a JOB in the IT Sector.
Hi Sai, To find right career path you need to try things ( Which is long way). I would suggest you to learn multiple things ( implementation is important part) and then find your intrest and dive in to...
Sai

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Embedding and including
Let's first see a simple example: This is a JavaScript example Usually, JavaScript code starts with the tag . The code placed between and . Sometimes, people embed the code in the tags: Why do we...

AngularJS Program Syllabus
What You will Learn in AngularJS Program? Introduction to AngularJS. AngularJS Expressions: Numbers, Strings, Objects, Arrays, Expressions using {{ }} and ng-bind. Modules: Creating a module, adding...

What Should I Learn in 2025 for Frontend or Web Technology?
If you're wondering what to focus on in 2025 to excel in frontend development, here's a concise guide: 1. React.js React remains one of the most in-demand technologies for building modern web applications....

Why AngularJS Got Popular
AngularJS became very popular due to its easy two-way data binding, MVC architecture, built-in module system, dependency injection, and routing package. Initially built as a hobby project by Misko Hevery...

Dependency Injection in Angular 2
Dependency injection Dependency injection is a way to supply a new instance of a class with the fully-formed dependencies it requires. Most dependencies are services. Angular uses dependency injection...

Recommended Articles

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Software Development has been one of the most popular career trends since years. The reason behind this is the fact that software are being used almost everywhere today.  In all of our lives, from the morning’s alarm clock to the coffee maker, car, mobile phone, computer, ATM and in almost everything we use in our daily...

Read full article >

Looking for Angular.JS Training?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Angular.JS Classes?

The best tutors for Angular.JS Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Angular.JS with the Best Tutors

The best Tutors for Angular.JS Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more