Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 55 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { ValueAccessorBase } from './../abstract/ValueAccessorBase'; |
||
2 | /** |
||
3 | Copyright 2018 June Hanabi |
||
4 | |||
5 | Licensed under the Apache License, Version 2.0 (the "License"); |
||
6 | you may not use this file except in compliance with the License. |
||
7 | You may obtain a copy of the License at |
||
8 | |||
9 | http://www.apache.org/licenses/LICENSE-2.0 |
||
10 | |||
11 | Unless required by applicable law or agreed to in writing, software |
||
12 | distributed under the License is distributed on an "AS IS" BASIS, |
||
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
14 | See the License for the specific language governing permissions and |
||
15 | limitations under the License. |
||
16 | */ |
||
17 | |||
18 | import { Component, EventEmitter, Output, Input, OnInit } from '@angular/core'; |
||
19 | |||
20 | import { |
||
21 | NG_VALUE_ACCESSOR, |
||
22 | } from '@angular/forms'; |
||
23 | |||
24 | @Component({ |
||
25 | selector: 'sign-item', |
||
26 | templateUrl: './sign-item.component.pug', |
||
27 | styleUrls: ['./sign-item.component.scss'], |
||
28 | providers: [ |
||
29 | { provide: NG_VALUE_ACCESSOR, useExisting: SignItemComponent, multi: true } |
||
30 | ], |
||
31 | }) |
||
32 | export class SignItemComponent extends ValueAccessorBase<string> implements OnInit { |
||
33 | |||
34 | constructor() { |
||
35 | super(); |
||
36 | } |
||
37 | |||
38 | ngOnInit() { |
||
39 | |||
40 | } |
||
41 | |||
42 | @Input() |
||
43 | public disabled: boolean = false; |
||
44 | |||
45 | @Input() |
||
46 | public data: any = { x: 0, y: 0, text: 0 }; |
||
47 | |||
48 | @Output() |
||
49 | public remove: EventEmitter<boolean> = new EventEmitter(); |
||
50 | |||
51 | remListItem() { |
||
52 | this.remove.emit(true); |
||
53 | } |
||
54 | } |
||
55 |