We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b25b09b commit 71712a2Copy full SHA for 71712a2
src/directives/message.js
@@ -47,6 +47,7 @@ angular.module('schemaForm').directive('sfMessage',
47
// We only show one error.
48
// TODO: Make that optional
49
var error = errors[0];
50
+
51
if (error) {
52
element.html(sfErrorMessage.interpolate(
53
error,
@@ -60,7 +61,15 @@ angular.module('schemaForm').directive('sfMessage',
60
61
}
62
63
};
- update();
64
65
+ // When link occurs we might not have form with the new builder.
66
+ var once = scope.$watch('form', function(form) {
67
+ if (form) {
68
+ update();
69
+ once();
70
+ }
71
+ });
72
73
74
scope.$watchCollection('ngModel.$error', function() {
75
if (scope.ngModel) {
0 commit comments