From b8bd4d5460d9952e9a3bb14992636b17859bd457 Mon Sep 17 00:00:00 2001 From: David Chang Date: Thu, 17 Jan 2013 20:08:27 -0800 Subject: feat(directive): added ng-open boolean directive Closes# 1797 add ng-open attribute--- src/ng/directive/booleanAttrs.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/ng/directive/booleanAttrs.js') diff --git a/src/ng/directive/booleanAttrs.js b/src/ng/directive/booleanAttrs.js index 8902c35d..864c12c1 100644 --- a/src/ng/directive/booleanAttrs.js +++ b/src/ng/directive/booleanAttrs.js @@ -272,6 +272,37 @@ * @param {string} expression Angular expression that will be evaluated. */ +/** + * @ngdoc directive + * @name ng.directive:ngOpen + * @restrict A + * + * @description + * The HTML specs do not require browsers to preserve the special attributes such as open. + * (The presence of them means true and absence means false) + * This prevents the angular compiler from correctly retrieving the binding expression. + * To solve this problem, we introduce the `ngMultiple` directive. + * + * @example + + + Check me check multiple:
+
+ Show/Hide me +
+
+ + it('should toggle open', function() { + expect(element('#details').prop('open')).toBeFalsy(); + input('open').check(); + expect(element('#details').prop('open')).toBeTruthy(); + }); + +
+ * + * @element DETAILS + * @param {string} expression Angular expression that will be evaluated. + */ var ngAttributeAliasDirectives = {}; -- cgit v1.2.3