Sha256: c66af29497c67c52a115111131192d0a80dd80ecca64acbbcc61f3588578925c

Contents?: true

Size: 549 Bytes

Versions: 14

Compression:

Stored size: 549 Bytes

Contents

/**
 * @ngdoc filter
 * @name Bastion.utils.filter:as
 *
 * @requires $parse
 *
 * @description
 *   Adds variable to scope with the value passed in. This allows adding to the
 *   scope a variable that contains the result of multiple applied filters.
 *
 * @example
 *   <ul>
       <li ng-repeat="item in items | filter:customFilter | as:filteredItems"></li>
     </ul>
 */
angular.module('Bastion.utils').filter('as', ['$parse', function ($parse) {
    return function (value, path) {
        return $parse(path).assign(this, value);
    };
}]);

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bastion-3.3.0 app/assets/javascripts/bastion/utils/as.filter.js
bastion-3.2.2 app/assets/javascripts/bastion/utils/as.filter.js
bastion-3.2.1 app/assets/javascripts/bastion/utils/as.filter.js
bastion-3.2.0 app/assets/javascripts/bastion/utils/as.filter.js
bastion-3.1.0 app/assets/javascripts/bastion/utils/as.filter.js
bastion-3.0.1 app/assets/javascripts/bastion/utils/as.filter.js
bastion-3.0.0 app/assets/javascripts/bastion/utils/as.filter.js
bastion-2.1.0 app/assets/javascripts/bastion/utils/as.filter.js
bastion-2.0.4 app/assets/javascripts/bastion/utils/as.filter.js
bastion-2.0.3 app/assets/javascripts/bastion/utils/as.filter.js
bastion-2.0.2 app/assets/javascripts/bastion/utils/as.filter.js
bastion-2.0.1 app/assets/javascripts/bastion/utils/as.filter.js
bastion-2.0.0 app/assets/javascripts/bastion/utils/as.filter.js
bastion-1.0.2 app/assets/javascripts/bastion/utils/as.filter.js