From 7e6f9992216157a10a64a86fe526f61f9f57e43f Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 12 Nov 2010 15:16:33 -0800 Subject: added remaining directives and search box. --- src/directives.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/directives.js') diff --git a/src/directives.js b/src/directives.js index 50901cbe..e359d6cc 100644 --- a/src/directives.js +++ b/src/directives.js @@ -155,7 +155,7 @@ angularDirective("ng:eval", function(expression){ * HTML element with the value of the given expression and kept it up to * date when the expression's value changes. Usually you just write * {{expression}} and let compile it into - * at bootstrap time. + * `` at bootstrap time. * * @element ANY * @param {expression} expression to eval. @@ -649,6 +649,7 @@ angularDirective("ng:submit", function(expression, element) { expect(using('.doc-example-live').binding('counter')).toBe('3'); }); */ +//TODO: delete me, since having watch in UI is logic in UI. (leftover form getangular) angularDirective("ng:watch", function(expression, element){ return function(element){ var self = this; @@ -862,15 +863,28 @@ angularDirective("ng:hide", function(expression, element){ * @name angular.directive.ng:style * * @description + * The ng:style allows you to set CSS style on an HTML element conditionally. * * @element ANY - * @param {expression} expression to eval. + * @param {expression} expression which evals to an object whes key's are + * CSS style names and values are coresponding values for those + * CSS keys. * * @exampleDescription * @example + + +
+ Sample Text +
myStyle={{myStyle}}
* * @scenario it('should check ng:style', function(){ + expect(element('.doc-example-live span').css('color')).toBe('rgb(0, 0, 0)'); + element('.doc-example-live :button[value=set]').click(); + expect(element('.doc-example-live span').css('color')).toBe('red'); + element('.doc-example-live :button[value=clear]').click(); + expect(element('.doc-example-live span').css('color')).toBe('rgb(0, 0, 0)'); }); */ angularDirective("ng:style", function(expression, element){ -- cgit v1.2.3