Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Commit 3e66972

Browse files
committed
test(formly-form): closes issue #616
1 parent fcb91c8 commit 3e66972

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/directives/formly-form.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,10 +570,10 @@ describe('formly-form', () => {
570570
template: input, key: 'bar',
571571
model: scope.fieldModel,
572572
hideExpression: ($viewValue, $modelValue, scope) => {
573-
return !!scope.fields[1].data.formScope.fieldModel.foo //since the scope passed to the function belongs to the field,
574-
}, //we store the form's scope in data property to access it here.
575-
data: {
576-
formScope: scope, //the form's scope
573+
return !!scope.fields[1].data.parentScope.fieldModel.foo //since the scope passed to the function belongs to the form,
574+
}, //we store the outer(parent) scope in 'data' property to access
575+
data: { //the template named 'foo' stored in the fields array
576+
parentScope: scope, //the parent scope(one used to compile the form)
577577
},
578578
},
579579
]

0 commit comments

Comments
 (0)