Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Injectable } from '@angular/core';
- import { MongoService} from 'wacom'
- @Injectable({
- providedIn: 'root'
- })
- export class CompService {
- public comp:any = []
- public _comp:any = {}
- constructor(
- private mongo: MongoService,
- ) {
- this.mongo.get('comp', {}, (arr, obj) => {
- this.comp = arr
- this._comp = obj
- })
- }
- create(pc) {
- this.mongo.create('comp', pc)
- }
- delete(pc = 0) {
- this.mongo.delete('comp', pc)
- }
- update(pc) {
- this.mongo.update('comp', pc)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement