Skip to content
No description, website, or topics provided.
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
models
.gitignore
.npmignore
README.md
grocery-list.service.ts
index.ts
package.json
tsconfig.json
user.service.ts

README.md

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
  ],
You can’t perform that action at this time.