Skip to content

Commit bb9a777

Browse files
committed
Default decorator getter
1 parent 0358f83 commit bb9a777

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

dist/schema-form.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/services/decorators.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ angular.module('schemaForm').provider('schemaFormDecorators',['$compileProvider'
9090
/**
9191
* Getter for directive mappings
9292
* Can be used to override a mapping or add a rule
93-
* @param {string} name
93+
* @param {string} name (optional) defaults to defaultDecorator
9494
* @return {Object} rules and mappings { rules: [],mappings: {}}
9595
*/
9696
this.directive = function(name) {
97+
name = name || defaultDecorator;
9798
return directives[name];
9899
};
99100

0 commit comments

Comments
 (0)