From 2e977e25407583576a0d197dbd8e460f1cc07526 Mon Sep 17 00:00:00 2001 From: Yichao Wang Date: Wed, 24 Jun 2015 19:44:12 +0800 Subject: [PATCH] docs(ngAnimate): if statement typo. use element css selector. Replace ? to :. The directive is a element in example not an attribute. --- src/ngAnimate/module.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ngAnimate/module.js b/src/ngAnimate/module.js index a6bae77add3c..935f5f16e7b5 100644 --- a/src/ngAnimate/module.js +++ b/src/ngAnimate/module.js @@ -655,7 +655,7 @@ * ngModule.directive('greetingBox', ['$animate', function($animate) { * return function(scope, element, attrs) { * attrs.$observe('active', function(value) { - * value ? $animate.addClass(element, 'on') ? $animate.removeClass(element, 'on'); + * value ? $animate.addClass(element, 'on') : $animate.removeClass(element, 'on'); * }); * }); * }]); @@ -666,7 +666,7 @@ * * ```css * /* normally we would create a CSS class to reference on the element */ - * [greeting-box].on { transition:0.5s linear all; background:green; color:white; } + * greeting-box.on { transition:0.5s linear all; background:green; color:white; } * ``` * * The `$animate` service contains a variety of other methods like `enter`, `leave`, `animate` and `setClass`. To learn more about what's