diff options
| author | Igor Minar | 2014-02-18 03:04:42 -0800 | 
|---|---|---|
| committer | Igor Minar | 2014-02-18 10:44:48 -0800 | 
| commit | 481508d0e7ae9e4984ea380b9a43e589551c7a5b (patch) | |
| tree | 2df21cbd83152c5e504cdc7f3b579b25bdc9fadb /src | |
| parent | 12e4d3ac4da3e7ea8d9be49764dbbc091a345bf7 (diff) | |
| download | angular.js-481508d0e7ae9e4984ea380b9a43e589551c7a5b.tar.bz2 | |
style: remove ws and enfore no-trailing-ws jscs rule
Diffstat (limited to 'src')
| -rw-r--r-- | src/Angular.js | 4 | ||||
| -rw-r--r-- | src/AngularPublic.js | 4 | ||||
| -rw-r--r-- | src/auto/injector.js | 6 | ||||
| -rw-r--r-- | src/ng/anchorScroll.js | 4 | ||||
| -rw-r--r-- | src/ng/animate.js | 4 | ||||
| -rw-r--r-- | src/ng/cacheFactory.js | 22 | ||||
| -rw-r--r-- | src/ng/directive/booleanAttrs.js | 12 | ||||
| -rw-r--r-- | src/ng/directive/form.js | 2 | ||||
| -rw-r--r-- | src/ng/directive/input.js | 6 | ||||
| -rw-r--r-- | src/ng/directive/ngBind.js | 4 | ||||
| -rw-r--r-- | src/ng/directive/ngShowHide.js | 4 | ||||
| -rw-r--r-- | src/ng/directive/ngTransclude.js | 2 | ||||
| -rw-r--r-- | src/ng/exceptionHandler.js | 6 | ||||
| -rw-r--r-- | src/ng/filter.js | 4 | ||||
| -rw-r--r-- | src/ng/filter/limitTo.js | 6 | ||||
| -rw-r--r-- | src/ng/http.js | 2 | ||||
| -rw-r--r-- | src/ng/httpBackend.js | 2 | ||||
| -rw-r--r-- | src/ng/log.js | 10 | ||||
| -rw-r--r-- | src/ng/q.js | 2 | ||||
| -rw-r--r-- | src/ng/sce.js | 2 | ||||
| -rw-r--r-- | src/ng/timeout.js | 2 | ||||
| -rw-r--r-- | src/ngCookies/cookies.js | 2 | ||||
| -rw-r--r-- | src/ngResource/resource.js | 4 | ||||
| -rw-r--r-- | src/ngRoute/route.js | 4 | ||||
| -rw-r--r-- | src/ngScenario/ObjectModel.js | 2 | ||||
| -rw-r--r-- | src/ngTouch/touch.js | 2 | 
26 files changed, 62 insertions, 62 deletions
| diff --git a/src/Angular.js b/src/Angular.js index 4b952b57..21595cd6 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -92,13 +92,13 @@   * @name ng   * @module ng   * @description - *  + *   * # ng (core module)   * The ng module is loaded by default when an AngularJS application is started. The module itself   * contains the essential components for an AngularJS application to function. The table below   * lists a high level breakdown of each of the services/factories, filters, directives and testing   * components available within this core module. - *  + *   * <div doc-module-components="ng"></div>   */ diff --git a/src/AngularPublic.js b/src/AngularPublic.js index 98a5094a..006de9ab 100644 --- a/src/AngularPublic.js +++ b/src/AngularPublic.js @@ -3,10 +3,10 @@  /* global      angularModule: true,      version: true, -     +      $LocaleProvider,      $CompileProvider, -     +      htmlAnchorDirective,      inputDirective,      inputDirective, diff --git a/src/auto/injector.js b/src/auto/injector.js index 62b52620..c39593f3 100644 --- a/src/auto/injector.js +++ b/src/auto/injector.js @@ -350,7 +350,7 @@ function annotate(fn) {   *   *   - `Object`: then it should have a `$get` method. The `$get` method will be invoked using   *     {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created. - *   - `Constructor`: a new instance of the provider will be created using                      + *   - `Constructor`: a new instance of the provider will be created using   *     {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.   *   * @returns {Object} registered provider instance @@ -478,9 +478,9 @@ function annotate(fn) {   *   var Ping = function($http) {   *     this.$http = $http;   *   }; - *  + *   *   Ping.$inject = ['$http']; - *    + *   *   Ping.prototype.send = function() {   *     return this.$http.get('/ping');   *   }; diff --git a/src/ng/anchorScroll.js b/src/ng/anchorScroll.js index 5c5a0387..e8c8ecd1 100644 --- a/src/ng/anchorScroll.js +++ b/src/ng/anchorScroll.js @@ -15,7 +15,7 @@   *   * It also watches the `$location.hash()` and scrolls whenever it changes to match any anchor.   * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`. - *  + *   * @example     <example>       <file name="index.html"> @@ -30,7 +30,7 @@             // set the location.hash to the id of             // the element you wish to scroll to.             $location.hash('bottom'); -            +             // call $anchorScroll()             $anchorScroll();           }; diff --git a/src/ng/animate.js b/src/ng/animate.js index 21566948..d438b169 100644 --- a/src/ng/animate.js +++ b/src/ng/animate.js @@ -17,7 +17,7 @@ var $animateMinErr = minErr('$animate');   */  var $AnimateProvider = ['$provide', function($provide) { -   +    this.$$selectors = {}; @@ -153,7 +153,7 @@ var $AnimateProvider = ['$provide', function($provide) {         * @description Moves the position of the provided element within the DOM to be placed         * either after the `after` element or inside of the `parent` element. Once complete, the         * done() callback will be fired (if provided). -       *  +       *         * @param {jQuery/jqLite element} element the element which will be moved around within the         *   DOM         * @param {jQuery/jqLite element} parent the parent element where the element will be diff --git a/src/ng/cacheFactory.js b/src/ng/cacheFactory.js index 9371ca58..ea0195f6 100644 --- a/src/ng/cacheFactory.js +++ b/src/ng/cacheFactory.js @@ -6,9 +6,9 @@   *   * @description   * Factory that constructs cache objects and gives access to them. - *  + *   * ```js - *  + *   *  var cache = $cacheFactory('cacheId');   *  expect($cacheFactory.get('cacheId')).toBe(cache);   *  expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined(); @@ -17,8 +17,8 @@   *  cache.put("another key", "another value");   *   *  // We've specified no options on creation - *  expect(cache.info()).toEqual({id: 'cacheId', size: 2});  - *  + *  expect(cache.info()).toEqual({id: 'cacheId', size: 2}); + *   * ```   *   * @@ -199,7 +199,7 @@ function $CacheFactoryProvider() {   * The first time a template is used, it is loaded in the template cache for quick retrieval. You   * can load templates directly into the cache in a `script` tag, or by consuming the   * `$templateCache` service directly. - *  + *   * Adding via the `script` tag:   * ```html   * <html ng-app> @@ -211,29 +211,29 @@ function $CacheFactoryProvider() {   *   ...   * </html>   * ``` - *  + *   * **Note:** the `script` tag containing the template does not need to be included in the `head` of   * the document, but it must be below the `ng-app` definition. - *  + *   * Adding via the $templateCache service: - *  + *   * ```js   * var myApp = angular.module('myApp', []);   * myApp.run(function($templateCache) {   *   $templateCache.put('templateId.html', 'This is the content of the template');   * });   * ``` - *  + *   * To retrieve the template later, simply use it in your HTML:   * ```html   * <div ng-include=" 'templateId.html' "></div>   * ``` - *  + *   * or get it via Javascript:   * ```js   * $templateCache.get('templateId.html')   * ``` - *  + *   * See {@link ng.$cacheFactory $cacheFactory}.   *   */ diff --git a/src/ng/directive/booleanAttrs.js b/src/ng/directive/booleanAttrs.js index 10a98d15..ff3cf5ee 100644 --- a/src/ng/directive/booleanAttrs.js +++ b/src/ng/directive/booleanAttrs.js @@ -191,7 +191,7 @@      </example>   *   * @element INPUT - * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,  + * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,   *     then special attribute "disabled" will be set on the element   */ @@ -226,7 +226,7 @@      </example>   *   * @element INPUT - * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,  + * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,   *     then special attribute "checked" will be set on the element   */ @@ -261,7 +261,7 @@      </example>   *   * @element INPUT - * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,  + * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,   *     then special attribute "readonly" will be set on the element   */ @@ -280,7 +280,7 @@   * The `ngSelected` directive solves this problem for the `selected` atttribute.   * This complementary directive is not removed by the browser and so provides   * a permanent reliable place to store the binding information. - *  + *   * @example      <example>        <file name="index.html"> @@ -300,7 +300,7 @@      </example>   *   * @element OPTION - * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,  + * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,   *     then special attribute "selected" will be set on the element   */ @@ -336,7 +336,7 @@       </example>   *   * @element DETAILS - * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,  + * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,   *     then special attribute "open" will be set on the element   */ diff --git a/src/ng/directive/form.js b/src/ng/directive/form.js index b55eec6d..c5e39cde 100644 --- a/src/ng/directive/form.js +++ b/src/ng/directive/form.js @@ -36,7 +36,7 @@ var nullFormCtrl = {   *  - `pattern`   *  - `required`   *  - `url` - *  + *   * @description   * `FormController` keeps track of all its controls and nested forms as well as state of them,   * such as being valid/invalid or dirty/pristine. diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index 3169c6de..a3547bb1 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -295,7 +295,7 @@ var inputType = {            var text = element(by.binding('text'));            var valid = element(by.binding('myForm.input.$valid'));            var input = element(by.model('text')); -           +            it('should initialize to model', function() {              expect(text.getText()).toContain('me@example.com');              expect(valid.getText()).toContain('true'); @@ -409,7 +409,7 @@ var inputType = {              expect(value1.getText()).toContain('true');              expect(value2.getText()).toContain('YES'); -             +              element(by.model('value1')).click();              element(by.model('value2')).click(); @@ -1021,7 +1021,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$     * You can override this for input directives whose concept of being empty is different to the     * default. The `checkboxInputType` directive does this because in its case a value of `false`     * implies empty. -   *  +   *     * @param {*} value Reference to check.     * @returns {boolean} True if `value` is empty.     */ diff --git a/src/ng/directive/ngBind.js b/src/ng/directive/ngBind.js index 6bd4fd27..2bd01f91 100644 --- a/src/ng/directive/ngBind.js +++ b/src/ng/directive/ngBind.js @@ -144,14 +144,14 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) {   *   * @example     Try it here: enter text in text box and watch the greeting change. -  +     <example module="ngBindHtmlExample" deps="angular-sanitize.js">       <file name="index.html">         <div ng-controller="ngBindHtmlCtrl">          <p ng-bind-html="myHTML"></p>         </div>       </file> -      +       <file name="script.js">         angular.module('ngBindHtmlExample', ['ngSanitize']) diff --git a/src/ng/directive/ngShowHide.js b/src/ng/directive/ngShowHide.js index c783f181..59312f0f 100644 --- a/src/ng/directive/ngShowHide.js +++ b/src/ng/directive/ngShowHide.js @@ -56,7 +56,7 @@   * **Note:** Here is a list of values that ngShow will consider as a falsy value (case insensitive):<br />   * "f" / "0" / "false" / "no" / "n" / "[]"   * </div> - *  + *   * ## A note about animations with ngShow   *   * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression @@ -211,7 +211,7 @@ var ngShowDirective = ['$animate', function($animate) {   * ```   *   * Just remember to include the important flag so the CSS override will function. - *  + *   * <div class="alert alert-warning">   * **Note:** Here is a list of values that ngHide will consider as a falsy value (case insensitive):<br />   * "f" / "0" / "false" / "no" / "n" / "[]" diff --git a/src/ng/directive/ngTransclude.js b/src/ng/directive/ngTransclude.js index 44d50e03..bcc657d1 100644 --- a/src/ng/directive/ngTransclude.js +++ b/src/ng/directive/ngTransclude.js @@ -64,7 +64,7 @@ var ngTranscludeDirective = ngDirective({         'Element: {0}',         startingTag($element));      } -     +      $transclude(function(clone) {        $element.empty();        $element.append(clone); diff --git a/src/ng/exceptionHandler.js b/src/ng/exceptionHandler.js index 342f38fc..8899bf39 100644 --- a/src/ng/exceptionHandler.js +++ b/src/ng/exceptionHandler.js @@ -9,12 +9,12 @@   * Any uncaught exception in angular expressions is delegated to this service.   * The default implementation simply delegates to `$log.error` which logs it into   * the browser console. - *  + *   * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by   * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.   *   * ## Example: - *  + *   * ```js   *   angular.module('exceptionOverride', []).factory('$exceptionHandler', function () {   *     return function (exception, cause) { @@ -23,7 +23,7 @@   *     };   *   });   * ``` - *  + *   * This example will override the normal action of `$exceptionHandler`, to make angular   * exceptions fail hard when they happen, instead of just logging to the console.   * diff --git a/src/ng/filter.js b/src/ng/filter.js index c78f526e..5010b130 100644 --- a/src/ng/filter.js +++ b/src/ng/filter.js @@ -32,7 +32,7 @@   *   * The filter function is registered with the `$injector` under the filter name suffix with   * `Filter`. - *  + *   * ```js   *   it('should be the same instance', inject(   *     function($filterProvider) { @@ -106,7 +106,7 @@ function $FilterProvider($provide) {    }];    //////////////////////////////////////// -   +    /* global      currencyFilter: false,      dateFilter: false, diff --git a/src/ng/filter/limitTo.js b/src/ng/filter/limitTo.js index aa112cf6..7e198cb3 100644 --- a/src/ng/filter/limitTo.js +++ b/src/ng/filter/limitTo.js @@ -11,9 +11,9 @@   * the value and sign (positive or negative) of `limit`.   *   * @param {Array|string} input Source array or string to be limited. - * @param {string|number} limit The length of the returned array or string. If the `limit` number  + * @param {string|number} limit The length of the returned array or string. If the `limit` number   *     is positive, `limit` number of items from the beginning of the source array/string are copied. - *     If the number is negative, `limit` number  of items from the end of the source array/string  + *     If the number is negative, `limit` number  of items from the end of the source array/string   *     are copied. The `limit` will be trimmed if it exceeds `array.length`   * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array   *     had less than `limit` elements. @@ -72,7 +72,7 @@  function limitToFilter(){    return function(input, limit) {      if (!isArray(input) && !isString(input)) return input; -     +      limit = int(limit);      if (isString(input)) { diff --git a/src/ng/http.js b/src/ng/http.js index 04cb3d28..94076e72 100644 --- a/src/ng/http.js +++ b/src/ng/http.js @@ -556,7 +556,7 @@ function $HttpProvider() {       *    - **withCredentials** - `{boolean}` - whether to to set the `withCredentials` flag on the       *      XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5       *      for more information. -     *    - **responseType** - `{string}` - see  +     *    - **responseType** - `{string}` - see       *      [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).       *       * @returns {HttpPromise} Returns a {@link ng.$q promise} object with the diff --git a/src/ng/httpBackend.js b/src/ng/httpBackend.js index c3805e35..ee2a37fe 100644 --- a/src/ng/httpBackend.js +++ b/src/ng/httpBackend.js @@ -112,7 +112,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc            // WebKit added support for the json responseType value on 09/03/2013            // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are            // known to throw when setting the value "json" as the response type. Other older -          // browsers implementing the responseType  +          // browsers implementing the responseType            //            // The json response type can be ignored if not supported, because JSON payloads are            // parsed on the client-side regardless. diff --git a/src/ng/log.js b/src/ng/log.js index e228701b..f704184a 100644 --- a/src/ng/log.js +++ b/src/ng/log.js @@ -8,7 +8,7 @@   * @description   * Simple service for logging. Default implementation safely writes the message   * into the browser's console (if present). - *  + *   * The main purpose of this service is to simplify debugging and troubleshooting.   *   * The default is to log `debug` messages. You can use @@ -45,7 +45,7 @@  function $LogProvider(){    var debug = true,        self = this; -   +    /**     * @ngdoc property     * @name $logProvider#debugEnabled @@ -61,7 +61,7 @@ function $LogProvider(){        return debug;      }    }; -   +    this.$get = ['$window', function($window){      return {        /** @@ -99,11 +99,11 @@ function $LogProvider(){         * Write an error message         */        error: consoleLog('error'), -       +        /**         * @ngdoc method         * @name $log#debug -       *  +       *         * @description         * Write a debug message         */ diff --git a/src/ng/q.js b/src/ng/q.js index 60711a7b..e7ff26ef 100644 --- a/src/ng/q.js +++ b/src/ng/q.js @@ -18,7 +18,7 @@   * ```js   *   // for the purpose of this example let's assume that variables `$q`, `scope` and `okToGreet`   *   // are available in the current lexical scope (they could have been injected or passed in). - *  + *   *   function asyncGreet(name) {   *     var deferred = $q.defer();   * diff --git a/src/ng/sce.js b/src/ng/sce.js index 9eaf9097..c9a1b3e6 100644 --- a/src/ng/sce.js +++ b/src/ng/sce.js @@ -446,7 +446,7 @@ function $SceDelegateProvider() {   * allowing only the files in a specific directory to do this.  Ensuring that the internal API   * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.   * - * In the case of AngularJS' SCE service, one uses {@link ng.$sce#methods_trustAs $sce.trustAs}  + * In the case of AngularJS' SCE service, one uses {@link ng.$sce#methods_trustAs $sce.trustAs}   * (and shorthand methods such as {@link ng.$sce#methods_trustAsHtml $sce.trustAsHtml}, etc.) to   * obtain values that will be accepted by SCE / privileged contexts.   * diff --git a/src/ng/timeout.js b/src/ng/timeout.js index 8bca2962..d205c4d2 100644 --- a/src/ng/timeout.js +++ b/src/ng/timeout.js @@ -30,7 +30,7 @@ function $TimeoutProvider() {        *   will invoke `fn` within the {@link ng.$rootScope.Scope#methods_$apply $apply} block.        * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this        *   promise will be resolved with is the return value of the `fn` function. -      *  +      *        */      function timeout(fn, delay, invokeApply) {        var deferred = $q.defer(), diff --git a/src/ngCookies/cookies.js b/src/ngCookies/cookies.js index a94e241f..3a23b5db 100644 --- a/src/ngCookies/cookies.js +++ b/src/ngCookies/cookies.js @@ -7,7 +7,7 @@   *   * # ngCookies   * - * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.  + * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.   *   * {@installModule cookies}   * diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js index 98619918..2074d942 100644 --- a/src/ngResource/resource.js +++ b/src/ngResource/resource.js @@ -152,7 +152,7 @@ function shallowClearAndCopy(src, dst) {   *     'remove': {method:'DELETE'},   *     'delete': {method:'DELETE'} };   *   ``` - *    + *   *   Calling these methods invoke an {@link ng.$http} with the specified http method,   *   destination and parameters. When the data is returned from the server then the object is an   *   instance of the resource class. The actions `save`, `remove` and `delete` are available on it @@ -281,7 +281,7 @@ function shallowClearAndCopy(src, dst) {   *		var app = angular.module('app', ['ngResource', 'ngRoute']);   *   *		// Some APIs expect a PUT request in the format URL/object/ID - *		// Here we are creating an 'update' method  + *		// Here we are creating an 'update' method   *		app.factory('Notes', ['$resource', function($resource) {   *    return $resource('/notes/:id', null,   *        { diff --git a/src/ngRoute/route.js b/src/ngRoute/route.js index 94c4b581..d078ea0b 100644 --- a/src/ngRoute/route.js +++ b/src/ngRoute/route.js @@ -11,7 +11,7 @@   *   * ## Example   * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`. - *  + *   * {@installModule route}   *   * <div doc-module-components="ngRoute"></div> @@ -28,7 +28,7 @@ var ngRouteModule = angular.module('ngRoute', ['ng']).   * @description   *   * Used for configuring routes. - *  + *   * ## Example   * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.   * diff --git a/src/ngScenario/ObjectModel.js b/src/ngScenario/ObjectModel.js index 14672080..5deefdc4 100644 --- a/src/ngScenario/ObjectModel.js +++ b/src/ngScenario/ObjectModel.js @@ -141,7 +141,7 @@ angular.scenario.ObjectModel.prototype.on = function(eventName, listener) {  angular.scenario.ObjectModel.prototype.emit = function(eventName) {    var self = this,        args = Array.prototype.slice.call(arguments, 1); -   +    eventName = eventName.toLowerCase();    if (this.listeners[eventName]) { diff --git a/src/ngTouch/touch.js b/src/ngTouch/touch.js index 052cbdd3..45b518d8 100644 --- a/src/ngTouch/touch.js +++ b/src/ngTouch/touch.js @@ -8,7 +8,7 @@   * # ngTouch   *   * The `ngTouch` module provides touch events and other helpers for touch-enabled devices. - * The implementation is based on jQuery Mobile touch event handling  + * The implementation is based on jQuery Mobile touch event handling   * ([jquerymobile.com](http://jquerymobile.com/)).   *   * {@installModule touch} | 
