# angular-crud-op

> Install the angular-crud-operations package : **`npm i angular-crud-op`**

Latest version **0.0.2** (published 2018-12-17) · 0 weekly downloads

## Install

```sh
npm install angular-crud-op
pnpm add angular-crud-op
yarn add angular-crud-op
bun add angular-crud-op
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2018-12-17 |
| First published | 2018-12-17 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 34.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | saiteja26 |

## Links

- npm: https://www.npmjs.com/package/angular-crud-op
- npm.io page: https://npm.io/package/angular-crud-op

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Recent versions

- 0.0.2 (latest) — 2018-12-17
- 0.0.1 — 2018-12-17

## README

Install the angular-crud-operations package : **`npm i angular-crud-op`**

Extend `AngularCrudService`  into one of the service in your app  as below:
 ```
 @Injectable({
 providedIn: 'root'
})
export class CrudService extends AngularCrudService {
  parseData(data): any {
   return data;
 }
 constructor(http: HttpClient) {
   super(http);
 }
}
```

Call CrudService where ever you want to make HTTP request as below:
```
import {Component, OnInit} from '@angular/core';
import {CrudService} from '../crud.service';

@Component({
  selector: 'app-test',
  templateUrl: './test.component.html',
  styleUrls: ['./test.component.css']
})
export class TestComponent implements OnInit {

constructor(private crudService: CrudService) {
  }
  getData() {
    this.testService.sendGetRequest('https://jsonplaceholder.typicode.com/todos/1').subscribe(res => {
      console.log(res);
    });
  }
  
  //to make POST request
  postData() {
  const body: any = {};
    this.testService.sendPostRequest(''url', body).subscribe(res => {
      console.log(res);
    });
  }
  //Same process for PUT & DELETE.
  }
```

---
_Source: https://npm.io/package/angular-crud-op · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
