Ahlushko

Untitled

Jun 16th, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Component, OnInit } from '@angular/core';
  2. import { Router } from '@angular/router'
  3. import { CompService } from '@services'
  4. import { NgxIzitoastService } from 'ngx-izitoast';
  5. import { SearchPipe } from '../search.pipe'
  6. @Component({
  7.     selector: 'app-header',
  8.     templateUrl: './header.component.html',
  9.     styleUrls: ['./header.component.css']
  10. })
  11. export class HeaderComponent implements OnInit {
  12.     public OS: string = ''
  13.     public edit: any = {}
  14.     public add: boolean = false
  15.     public comp: any = {}
  16.     public properties = ['videoCard', 'CPU', 'motherboard', 'RAM']
  17.     constructor(
  18.         public pc: CompService,
  19.         ) {}
  20.     update(id) {
  21.         this.edit._id = id
  22.         this.pc.update(this.edit)
  23.     }
  24.     create() {
  25.         console.log(this.OS);
  26.         this.comp.OS = this.OS
  27.         this.pc.create(this.comp)
  28.         this.add = false
  29.     }
  30.     ngOnInit(): void {
  31.     }
  32. }
Add Comment
Please, Sign In to add comment