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

As web designer what is easy and useful to learn Angular or React?

React is easier to learn for someone with a good understanding of Javascript. Angular has a higher learning curve. Typescript, used in Angular, is easier to learn for someone with a background in OOP Languages...
Nikunj

Angular or React which is easy to learn and value in the market & job openings

Both are demanding in the market, but as per Google trends React much in demand than Angular. React is javascript based and Angular is typescript based. If you are good at javascript, then React is easy...
Ganesh

Which is Easy Angular or React JS ?

Both are tough(or easy) in their own way. React learning curve is short(not easy) but implementation is tougher than Angular. Angular learning curve is lengthy but implementation is easier than React
Ganesh
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

Introduction to Angular JS
What is AngularJS? AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly...

Angular Material
What is Angular Material? For developers using AngularJS, Angular Material is both a UI Component framework and a reference implementation of Google's Material Design Specification. This project provides...

Angular 4 Forms: Template Driven Approach
Angular Forms: Forms in Angular 4 can be designed on two approaches. As you can see below , we have a Template based design and the other being a Reactive based design. Here we will try to understand...

Angular Routing Overview
a. Routes: The browser is a familiar model of application navigation: Enter a URL in the address bar and the browser navigates to a corresponding page. Click links on the page and the browser...

Learning a new technology
Each and every day new technologies are getting introduced. Its quite clear that to be part of the fast moving professional world you should be upto date with the cutting edge technologies in the market....
S

Saurav Singh

1 0
0

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