Skip to content

Commit e95f660

Browse files
committed
Evaluate sfModel in the parent scope
Indirectly fixes #79.
1 parent c9fe209 commit e95f660

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/directives/schema-form.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ angular.module('schemaForm')
2020
scope: {
2121
schema: '=sfSchema',
2222
initialForm: '=sfForm',
23-
model: '=sfModel'
23+
model: '=sfModel',
24+
options: '=sfOptions'
2425
},
2526
controller: ['$scope', function($scope) {
2627
this.evalInParentScope = function(expr, locals) {
@@ -73,10 +74,7 @@ angular.module('schemaForm')
7374
lastDigest.schema = schema;
7475
lastDigest.form = form;
7576

76-
// Check for options
77-
var options = scope.$eval(attrs.sfOptions);
78-
79-
var merged = schemaForm.merge(schema, form, ignore, options);
77+
var merged = schemaForm.merge(schema, form, ignore, scope.options);
8078
var frag = document.createDocumentFragment();
8179

8280
//make the form available to decorators

0 commit comments

Comments
 (0)