diff options
| author | Matias Niemelàˆ | 2013-08-01 22:17:10 -0400 | 
|---|---|---|
| committer | Misko Hevery | 2013-08-03 00:46:17 -0700 | 
| commit | 6e8bd786ba853613472f3864e48048a425c46823 (patch) | |
| tree | f341aea0ca016d63f657ce64fda72cd9f6339d33 /src/ng/animate.js | |
| parent | 4ed5fc90b984bb704da8cb66dffab43cf78abefa (diff) | |
| download | angular.js-6e8bd786ba853613472f3864e48048a425c46823.tar.bz2 | |
fix(ngAnimate): remove compound JS selector animations
Diffstat (limited to 'src/ng/animate.js')
| -rw-r--r-- | src/ng/animate.js | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/src/ng/animate.js b/src/ng/animate.js index 7927b12f..2d9e6191 100644 --- a/src/ng/animate.js +++ b/src/ng/animate.js @@ -1,5 +1,7 @@  'use strict'; +var $animateMinErr = minErr('$animate'); +  /**   * @ngdoc object   * @name ng.$animateProvider @@ -14,7 +16,7 @@   */  var $AnimateProvider = ['$provide', function($provide) { -  this.$$selectors = []; +  this.$$selectors = {};    /** @@ -47,13 +49,11 @@ var $AnimateProvider = ['$provide', function($provide) {     * @param {function} factory The factory function that will be executed to return the animation object.     */    this.register = function(name, factory) { -    var classes = name.substr(1).split('.'); -    name += '-animation'; -    this.$$selectors.push({ -      selectors : classes, -      name : name -    }); -    $provide.factory(name, factory); +    var key = name + '-animation'; +    if (name && name.charAt(0) != '.') throw $animateMinErr('notcsel', +        "Expecting class selector starting with '.' got '{0}'.", name); +    this.$$selectors[name.substr(1)] = key; +    $provide.factory(key, factory);    };    this.$get = ['$timeout', function($timeout) { | 
