Passed
Pull Request — master (#22)
by
unknown
08:10 queued 04:20
created

src/app/fragments/sign-item/sign-item.component.ts   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 55
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 32
dl 0
loc 55
rs 10
c 0
b 0
f 0
wmc 2
mnd 0
bc 0
fnc 2
bpm 0
cpm 1
noi 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A SignItemComponent.remListItem 0 3 1
A SignItemComponent.ngOnInit 0 2 1
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