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

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
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
How do we save Data in Angular?
First you need save the data in local storage and after this you need have a json to store data.
Raminder
I want to join tutorial for angularjs with asp.net mvc. Please provide the details location of class, fee, duration etc...
Hi Asif, i will provide the angular js completed course training with one project and this project are combination of angular js and mvc web api . contact me if you are interested
Asif

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

Ask a Question

Related Lessons

Angular 4/5 Course
Angular 4/5 Syllabus: HTML Fundamentals: HTML Introduction How WebWorks? What is a Web Page? HTML Basic HTML Fundamentals HTML Attributes HTML Styles HTML Controls HTML Formatting HTML...

Inversion of Control
Problem You have classes that have dependencies on services or components whose concrete type is specified at design time. In this example, ClassA has dependencies on ServiceA and ServiceB. Figure 1 illustrates...

AngularJS Basics- 1
This is my first blog.I am just explaining the basics of AngularJS and Sample application in an interesting way so that anyone can create an Angular application. Let’s see how we can create :) Angular.js...

NgModules vs. JavaScript modules (Angular 2)
The NgModule — a class decorated with @NgModule Decorator — is a fundamental feature of Angular. JavaScript also has its own module system for managing collections of JavaScript objects. It's...

Angular Js Workshop & Courses
AngularJS is an open source JavaScript framework by Google to build web applications. It can be freely used, changed and shared by anyone. Prerequisite: Before learning AngularJS, you must...

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