groceries-angular-service

0.1.0 • Public • Published

groceries-angular-service

Setup

In order to make the service work you need to add an HttpModule to your @NgModule imports.

For NativeScript use NativeScriptHttpModule

import { NativeScriptHttpModule } from "nativescript-angular/http";
@NgModule({
  ...
  imports: [
    ...
    NativeScriptHttpModule
  ],

For Web use HttpModule

import { HttpModule } from '@angular/http';
@NgModule({
  ...
  imports: [
    ...
    NativeScriptHttpModule
  ],

Adding to providers

To provide the GroceryListService and UserService services, just import them from groceries-angular-service and add them to the @NgModule providers:

import { GroceryListService, UserService } from 'groceries-angular-service';

@NgModule({
  ...
  providers: [
    ...
    GroceryListService,
    UserService
  ],

Dependents (0)

Package Sidebar

Install

npm i groceries-angular-service

Weekly Downloads

1

Version

0.1.0

License

ISC

Last publish

Collaborators

  • sebawita