blob: e1c5d72968db1e1cfdd501ec96cace573ca0e6b3 [file] [log] [blame]
Ittay Stern6f900cc2018-08-29 17:01:32 +03001import { Component } from '@angular/core';
2import * as _ from 'lodash';
3import {DuplicateService} from "./duplicate.service";
4
5@Component({
6 selector: 'duplicate-vnf',
7 templateUrl : './duplicate-vnf.component.html',
8 styleUrls : ['./duplicate-vnf.component.scss']
9})
10export class DuplicateVnfComponent {
11 duplicateNumber : number = 1;
12 duplicateOptions : number[] = [];
13 duplicateService:DuplicateService;
14 constructor( private _duplicateService: DuplicateService ){
15 this.duplicateService = _duplicateService;
16 this.duplicateOptions = _.range(1, this._duplicateService.maxNumberOfDuplicate + 1);
17 this.onDuplicateNumberChange();
18 }
19
20 onDuplicateNumberChange() {
21 this.duplicateService.setNumberOfDuplicates(+this.duplicateNumber);
22 }
23
24
25}