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

Commit 79d6c0a

Browse files
committed
Custom templateUrl option
Usage : { key: 'name', templateUrl: '/views/myCustomInputTemplate.html' }
1 parent 8e76d2f commit 79d6c0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/directives/formly-field.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ angular.module('formly.render')
5151
value: '=formValue'
5252
},
5353
link: function fieldLink($scope, $element, $attr) {
54-
var templateUrl = getTemplateUrl($scope.options.type);
54+
var templateUrl = $scope.options.templateUrl || getTemplateUrl($scope.options.type);
5555
if (templateUrl) {
5656
$http.get(templateUrl, {
5757
cache: $templateCache
@@ -74,4 +74,4 @@ angular.module('formly.render')
7474
$scope.id = $scope.formId + $scope.options.type + $scope.index;
7575
}
7676
};
77-
});
77+
});

0 commit comments

Comments
 (0)