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

Commit 4fc7af3

Browse files
committed
feat(formly-form): Expand formly-form restriction to be both Element and Attribute
Formly-form was previously restricted as only an HTML element. Although that is still the recommended usage, it is now allowed to also be used as an attribute. closes #450
1 parent 15ce796 commit 4fc7af3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/directives/formly-form.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ export default formlyForm;
55
/**
66
* @ngdoc directive
77
* @name formlyForm
8-
* @restrict E
8+
* @restrict AE
99
*/
1010
// @ngInject
1111
function formlyForm(formlyUsability, formlyWarn, $parse, formlyConfig, $interpolate) {
1212
let currentFormId = 1;
1313
return {
14-
restrict: 'E',
14+
restrict: 'AE',
1515
template: formlyFormGetTemplate,
1616
replace: true,
1717
transclude: true,

src/directives/formly-form.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('formly-form', () => {
2121
scope.fields = [];
2222
}));
2323

24-
it.skip(`should be possible to use it as an attribute directive`, () => {
24+
it(`should be possible to use it as an attribute directive`, () => {
2525
const el = compileAndDigest(`
2626
<div formly-form model="model" fields="fields" form="theForm"></formly-form>
2727
`);

0 commit comments

Comments
 (0)