Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

Update #18

Merged
merged 4 commits into from
Jun 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/ngx-forms.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
"@angular/router": "^4.4.4",
"bootstrap": "^4.0.0",
"core-js": "^2.4.1",
"lodash": "4.17.10",
"ngx-chips": "^1.9.1",
"ngx-quill": "^3.1.0",
"quill": "^1.3.4",
"reflect-metadata": "^0.1.12",
"lodash": "4.17.10",
"rxjs": "5.5.6",
"zone.js": "^0.8.18"
},
Expand Down
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ import { DynamicFieldService } from "./app/services/dynamic-field.service";
})
export class NgxFormModule { }

export {DynamicFieldService}
export {DynamicFieldService, DataService}

10 changes: 8 additions & 2 deletions src/app/containers/dynamic-form/dynamic-form.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { FormGroup, FormBuilder, Validators, FormArray} from '@angular/forms';

import { FieldConfig } from '../../models/field-config.interface';
import { DataService } from '../../services/data.service';
Expand Down Expand Up @@ -54,9 +54,15 @@ export class DynamicFormComponent implements OnChanges, OnInit {
}
}

/**
* @description create FormGroup and FormControl for all general field, exclude custom field
* @return {FormGroup}
*/
createGroup() {
const group = this.fb.group({});
this.controls.forEach(control => group.addControl(control.name, this.createControl(control)));
this.controls.forEach(control => {
if (!control.custom) group.addControl(control.name, this.createControl(control));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kyxyes I'm not seeing the test coverage on Coveralls.io. Could you take a look please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KalleV Where or how could I see the test coverage on Coveralls.io?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kyxyes There should be a link in the PR status checks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KalleV Ok, but I saw the coverage results from travis build https://travis-ci.com/LabShare/ngx-forms/jobs/130848006

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kyxyes That's good, it means the test coverage is being generated in some form, but it seems to not be recognized by Coveralls based on the status of Coverage remained the same at ?% and the empty report.

});
return group;
}

Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"emitDecoratorMetadata": true,
"baseUrl": ".",
"allowJs": true,
"outDir": "dist",
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"inlineSources": true,
Expand Down