Skip to content

Commit 22a644c

Browse files
committed
fix(general) Sort out problems typsescript highlighted
1 parent 2904785 commit 22a644c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

js/fng-types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module fng {
2626
decorateScope($scope:fng.IFormScope, $modal, recordHandlerInstance : fng.IRecordHandler, ctrlState);
2727
fillFormFromBackendCustomSchema(schema, $scope:fng.IFormScope, formGeneratorInstance, recordHandlerInstance, ctrlState);
2828
fillFormWithBackendSchema($scope: fng.IFormScope, formGeneratorInstance, recordHandlerInstance, ctrlState);
29+
handleError($scope: fng.IFormScope);
2930
}
3031

3132
export interface IFormGenerator {
@@ -131,7 +132,9 @@ module fng {
131132
export interface IFormOptions extends IBaseFormOptions {
132133
schema? : string;
133134
subkey?: string;
135+
subkeyno?: number;
134136
subschema? : string;
137+
subschemaroot? : string;
135138
}
136139

137140
export interface IBuiltInRoute {

js/services/form-generator.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ module fng.services {
1212
*/
1313

1414
/*@ngInject*/
15+
import IFormController = angular.IFormController;
16+
17+
1518
export function formGenerator($location, $timeout, $filter, SubmissionsService, routingService, recordHandler) : IFormGenerator {
1619

1720
function handleSchema(description, source, destForm, destList, prefix, doRecursion, $scope, ctrlState) {
@@ -693,7 +696,7 @@ module fng.services {
693696

694697
$scope.setFormDirty = function (event) {
695698
if (event) {
696-
var form = angular.element(event.target).inheritedData('$formController');
699+
var form:any = angular.element(event.target).inheritedData('$formController');
697700
form.$setDirty();
698701
} else {
699702
console.log('setFormDirty called without an event (fine in a unit test)');
@@ -734,4 +737,7 @@ module fng.services {
734737
}
735738
};
736739
}
737-
}
740+
741+
formGenerator.$inject = ["$location", "$timeout", "$filter", "SubmissionsService", "routingService", "recordHandler"];
742+
743+
}

0 commit comments

Comments
 (0)