Skip to content

Commit 1ad660f

Browse files
committed
Change BaseField import order - fixes #58 #62
1 parent 8deacf3 commit 1ad660f

File tree

9 files changed

+28
-31
lines changed

9 files changed

+28
-31
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## v0.2.0-beta.1
4+
**Bugfixes:**
5+
- Changed import order of BaseField to fix angular-cli import
6+
37
## v0.2.0-beta.1
48
**Breaking changes:**
59
- Added Quickstart UI Module (README pending)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular2-token",
3-
"version": "0.2.0-beta.1",
3+
"version": "0.2.0-beta.2",
44
"description": "Angular2 service for token based authentication",
55
"main": "./angular2-token.js",
66
"typings": "./angular2-token.d.ts",

src/a2t-ui/a2t-shared/a2t-form/a2t-form-field/a2t-form-field.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, Input, OnInit } from '@angular/core';
22
import { FormGroup, AbstractControl } from '@angular/forms';
33

4-
import { BaseField } from '../';
4+
import { BaseField } from '../../../';
55

66
@Component({
77
selector: 'a2t-form-field',

src/a2t-ui/a2t-shared/a2t-form/a2t-form.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Component } from '@angular/core';
22

33
import {
44
A2tFormService,
5-
BaseField,
65
A2tFormFieldComponent
76
} from './';
87

src/a2t-ui/a2t-shared/a2t-form/a2t-form.model.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/a2t-ui/a2t-shared/a2t-form/a2t-form.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { FormGroup, FormControl } from '@angular/forms';
33
import { Subject } from 'rxjs/Subject';
44

55
import { SignInData } from '../../../angular2-token.model';
6-
import { BaseField } from './';
6+
import { BaseField } from '../../';
77

88
@Injectable()
99
export class A2tFormService {

src/a2t-ui/a2t-shared/a2t-form/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
export * from './a2t-form.model';
2-
31
export * from './a2t-form.service';
42

53
export * from './a2t-form-field/a2t-form-field.component';

src/a2t-ui/a2t-shared/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export * from './a2t-form/a2t-form.model';
21
export * from './a2t-form/a2t-form.service';
32

43
export * from './a2t-shared.module';

src/a2t-ui/a2t-ui.forms.ts

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
11
import { Validators } from '@angular/forms';
22

3-
import {
4-
BaseField
5-
} from './';
3+
export class BaseField{
4+
value: string;
5+
key: string;
6+
label: string;
7+
type: string;
8+
validators: any[];
9+
10+
constructor(options: {
11+
value?: string,
12+
key?: string,
13+
label?: string,
14+
type?: string,
15+
validators?: any[],
16+
} = {}) {
17+
this.value = options.value;
18+
this.key = options.key || '';
19+
this.label = options.label || '';
20+
this.validators = options.validators === undefined ? [] : options.validators;
21+
this.type = options.type || '';
22+
}
23+
}
624

725
export const SIGN_IN_FORM: BaseField[] = [
826
new BaseField({

0 commit comments

Comments
 (0)