# 1.6.10 crystalline-persuasion (2018-04-17) ## Bug Fixes - **$compile:** - correctly handle `null`/`undefined` href `attrs.$set()` ([f04e04](https://github.com/angular/angular.js/commit/f04e04e0e63e0d30c29718abd5cae634901793b2), [#16520](https://github.com/angular/angular.js/issues/16520)) - throw error in `$onChanges` immediately ([b7d1e0fbd](https://github.com/angular/angular.js/commit/983e27b628fd1eab653e2b3966d90a270f27cc93), [#15578](https://github.com/angular/angular.js/issues/15578), [#16492](https://github.com/angular/angular.js/issues/16492)) - **input:** - allow overriding timezone for date input types ([4355de](https://github.com/angular/angular.js/commit/4355dee21d26667bb7f6f21bf75c081351315033), [#16181](https://github.com/angular/angular.js/issues/16181), [#13382](https://github.com/angular/angular.js/issues/13382), [#16336](https://github.com/angular/angular.js/issues/16336)) - take timezone into account when validating minimum and maximum in date types ([2f0ac6](https://github.com/angular/angular.js/commit/2f0ac696cb09aec3e291bb8c9c8a1092cbe3a061), [#16342](https://github.com/angular/angular.js/issues/16342), [#16390](https://github.com/angular/angular.js/issues/16390)) - fix composition mode in IE for Korean input ([9a1b7c](https://github.com/angular/angular.js/commit/9a1b7c9fa135d1dae3f9b4ccf48f081675796e92), [#6656](https://github.com/angular/angular.js/issues/6656), [#16273](https://github.com/angular/angular.js/issues/16273)) - **jqLite:** use XHTML-compliant HTML as input for jqLite ([a0c55a](https://github.com/angular/angular.js/commit/a0c55af9858075ab268a88dd7a4464788a46f4b7), [#6917](https://github.com/angular/angular.js/issues/6917), [#16518](https://github.com/angular/angular.js/issues/16518)) - **minErr:** update url to https ([52e466](https://github.com/angular/angular.js/commit/52e46683bfcc0ce0dc9a3d2ee42b389508423799)) - **$http:** set correct xhrStatus in response when using 'timeout' ([1faf7e](https://github.com/angular/angular.js/commit/1faf7ec30d55bba107b18efbcf0ef07732c55b91)) - **browserTrigger:** support CompositionEvent ([c33fd1](https://github.com/angular/angular.js/commit/c33fd1325417fdc6d7d6abc90cd935130653b149)) ## New Features - **$http:** support sending XSRF token to whitelisted origins ([bc7757](https://github.com/angular/angular.js/commit/bc775759c88b2221c2bb71d2335bc233c93f43b0), [#7862](https://github.com/angular/angular.js/issues/7862)) - **minErr:** strip error url from error parameters ([980b69](https://github.com/angular/angular.js/commit/980b69dcae73dd8a3d0b9d91b63fa7711cd0ba36)) - **$sanitize:** support enhancing elements/attributes white-lists ([ee8e05](https://github.com/angular/angular.js/commit/ee8e05cfafe086188fc318ed4115fb56ba335112), [#5900](https://github.com/angular/angular.js/issues/5900), [#16326](https://github.com/angular/angular.js/issues/16326)) - **$rootScope:** allow suspending and resuming watchers on scope ([efb822c58](https://github.com/angular/angular.js/commit/41d5c90f170cc054b0f8f88220c22ef1ef6cc0a6), [#16308](https://github.com/angular/angular.js/issues/5301)) # 1.6.9 fiery-basilisk (2018-02-02) ## Bug Fixes - **input:** add `drop` event support for IE ([5dc076](https://github.com/angular/angular.js/commit/5dc07667de00c5e85fd69c5b7b7fe4fb5fd65a77)) - **ngMessages:** prevent memory leak from messages that are never attached ([9d058d](https://github.com/angular/angular.js/commit/9d058de04bb78694b83179e9b97bc40214eca01a), [#16389](https://github.com/angular/angular.js/issues/16389), [#16404](https://github.com/angular/angular.js/issues/16404), [#16406](https://github.com/angular/angular.js/issues/16406)) - **ngTransclude:** remove terminal: true ([1d826e](https://github.com/angular/angular.js/commit/1d826e2f1e941d14c3c56d7a0249f5796ba11f85), [#16411](https://github.com/angular/angular.js/issues/16411), [#16412](https://github.com/angular/angular.js/issues/16412)) - **$sanitize:** sanitize `xml:base` attributes ([b9ef65](https://github.com/angular/angular.js/commit/b9ef6585e10477fbbf912a971fe0b390bca692a6)) ## New Features - **currencyFilter:** trim whitespace around an empty currency symbol ([367390](https://github.com/angular/angular.js/commit/3673909896efb6ff47546caf7fc61549f193e043), [#15018](https://github.com/angular/angular.js/issues/15018), [#15085](https://github.com/angular/angular.js/issues/15085), [#15105](https://github.com/angular/angular.js/issues/15105)) # 1.6.8 beneficial-tincture (2017-12-18) ## Bug Fixes - **$location:** - always decode special chars in `$location.url(value)` ([2bdf71](https://github.com/angular/angular.js/commit/2bdf7126878c87474bb7588ce093d0a3c57b0026)) - decode non-component special chars in Hashbang URLS ([57b626](https://github.com/angular/angular.js/commit/57b626a673b7530399d3377dfe770165bec35f8a)) - **ngModelController:** allow $overrideModelOptions to set updateOn ([55516d](https://github.com/angular/angular.js/commit/55516da2dfc7c5798dce24e9fa930c5ac90c900c), [#16351](https://github.com/angular/angular.js/issues/16351), [#16364](https://github.com/angular/angular.js/issues/16364)) ## New Features - **$parse:** add a hidden interface to retrieve an expression's AST ([f33d95](https://github.com/angular/angular.js/commit/f33d95cfcff6fd0270f92a142df8794cca2013ad), [#16253](https://github.com/angular/angular.js/issues/16253), [#16260](https://github.com/angular/angular.js/issues/16260)) # 1.6.7 imperial-backstroke (2017-11-24) ## Bug Fixes - **$compile:** sanitize special chars in directive name ([c4003f](https://github.com/angular/angular.js/commit/c4003fd03489f876b646f06838f4edb576bacf6f), [#16314](https://github.com/angular/angular.js/issues/16314), [#16278](https://github.com/angular/angular.js/issues/16278)) - **$location:** do not decode forward slashes in the path in HTML5 mode ([e06ebf](https://github.com/angular/angular.js/commit/e06ebfdbb558544602fe9da4d7d98045a965f468), [#16312](https://github.com/angular/angular.js/issues/16312)) - **sanitizeUri:** sanitize URIs that contain IDEOGRAPHIC SPACE chars ([ddeb1d](https://github.com/angular/angular.js/commit/ddeb1df15a23de93eb95dbe202e83e93673e1c4e), [#16288](https://github.com/angular/angular.js/issues/16288)) - **$rootScope:** fix potential memory leak when removing scope listeners ([358a69](https://github.com/angular/angular.js/commit/358a69fa8b89b251ee44e523458d6c7f40b92b2d), [#16135](https://github.com/angular/angular.js/issues/16135), [#16161](https://github.com/angular/angular.js/issues/16161)) - **http:** do not allow encoded callback params in jsonp requests ([569e90](https://github.com/angular/angular.js/commit/569e906a5818271416ad0b749be2f58dc34938bd)) - **ngMock:** pass unexpected request failures in `$httpBackend` to the error handler ([1555a4](https://github.com/angular/angular.js/commit/1555a4911ad5360c145c0ddc8ec6c4bf9a381c13), [#16150](https://github.com/angular/angular.js/issues/16150), [#15855](https://github.com/angular/angular.js/issues/15855)) - **ngAnimate:** don't close transitions when child transitions close ([1391e9](https://github.com/angular/angular.js/commit/1391e99c7f73795180b792af21ad4402f96e225d), [#16210](https://github.com/angular/angular.js/issues/16210)) - **ngMock.browserTrigger:** add 'bubbles' to Transition/Animation Event ([7a5f06](https://github.com/angular/angular.js/commit/7a5f06d55d123a39bb7b030667fb1ab672939598)) ## New Features - **$sanitize, $compileProvider, linky:** add support for the "sftp" protocol in links ([a675ea](https://github.com/angular/angular.js/commit/a675ea034366fbb0fcf0d73fed65216aa99bce11), [#16102](https://github.com/angular/angular.js/issues/16102)) - **ngModel.NgModelController:** expose $processModelValue to run model -> view pipeline ([145194](https://github.com/angular/angular.js/commit/14519488ce9218aa891d34e89fc3271fd4ed0f04), [#3407](https://github.com/angular/angular.js/issues/3407), [#10764](https://github.com/angular/angular.js/issues/10764), [#16237](https://github.com/angular/angular.js/issues/16237)) - **$injector:** ability to load new modules after bootstrapping ([6e78fe](https://github.com/angular/angular.js/commit/6e78fee73258bb0ae36414f9db2e8734273e481b)) ## Performance Improvements - **jqLite:** - avoid setting class attribute when not changed ([9c95f6](https://github.com/angular/angular.js/commit/9c95f6d5e00ee7e054aabb3e363f5bfb3b7b4103)) - avoid repeated add/removeAttribute in jqLiteRemoveClass ([cab9eb](https://github.com/angular/angular.js/commit/cab9ebfd5a02e897f802bf6321b8471e4843c5d3), [#16078](https://github.com/angular/angular.js/issues/16078), [#16131](https://github.com/angular/angular.js/issues/16131)) # 1.6.6 interdimensional-cable (2017-08-18) ## Bug Fixes - **$httpParamSerializer:** ignore functions ([b51ded](https://github.com/angular/angular.js/commit/b51ded67366865f36c5781dd5d9b801488ec95ea), [#16133](https://github.com/angular/angular.js/issues/16133)) - **$resource:** do not throw when calling old `$cancelRequest()` ([009ebe](https://github.com/angular/angular.js/commit/009ebec64c81d11b280c635167050e8906e191c6), [#16037](https://github.com/angular/angular.js/issues/16037)) - **$parse:** - do not shallow-watch computed property keys ([750465](https://github.com/angular/angular.js/commit/7504656a26202de591e4ac9674333254304edf8a)) - support constants in computed keys ([9d6c3f](https://github.com/angular/angular.js/commit/9d6c3f3ec233279885e37a250d25860d5c15f716)) - **$http:** do not throw error if `Content-Type` is not `application/json` but response is JSON-like ([2e1163](https://github.com/angular/angular.js/commit/2e1163ef5cb56d1933e8ecd7b74020b9df9c6693), [#16027](https://github.com/angular/angular.js/issues/16027), [#16075](https://github.com/angular/angular.js/issues/16075)) ## New Features - **$compile:** add `strictComponentBindingsEnabled()` method ([3ec181](https://github.com/angular/angular.js/commit/3ec1819b913c8edf0649e06217dbd5920f29f126), [#16129](https://github.com/angular/angular.js/issues/16129)) - **$resource:** add resource to response for error interceptors ([9256db](https://github.com/angular/angular.js/commit/9256dbc4201343ce5cd63a9eadf98da4793f45af), [#16109](https://github.com/angular/angular.js/issues/16109)) - **$http:** allow differentiation between XHR completion, error, abort, timeout ([5e2bc5](https://github.com/angular/angular.js/commit/5e2bc5bbf347a9dfadc08b1514b8be06fd550913), [#15924](https://github.com/angular/angular.js/issues/15924), [#15847](https://github.com/angular/angular.js/issues/15847)) # 1.6.5 toffee-salinization (2017-07-03) ## Bug Fixes - **core:** - correctly detect Error instances from different contexts ([6daca0](https://github.com/angular/angular.js/commit/6daca023e42098f7098b9bf153c8e53a17af84f1), [#15868](https://github.com/angular/angular.js/issues/15868), [#15872](https://github.com/angular/angular.js/issues/15872)) - deprecate `angular.merge` ([dc41f4](https://github.com/angular/angular.js/commit/dc41f465baae9bc91418a61f446596157c530b6e), [#12653](https://github.com/angular/angular.js/issues/12653), [#14941](https://github.com/angular/angular.js/issues/14941), [#15180](https://github.com/angular/angular.js/issues/15180), [#15992](https://github.com/angular/angular.js/issues/15992), [#16036](https://github.com/angular/angular.js/issues/16036)) - **ngOptions:** - re-render after empty option has been removed ([510d0f](https://github.com/angular/angular.js/commit/510d0f946fa1a443ad43fa31bc9337676ef31332)) - allow empty option to be removed and re-added ([71b4da](https://github.com/angular/angular.js/commit/71b4daa4e10b6912891927ee2a7930c604b538f8)) - select unknown option if unmatched model does not match empty option ([17d34b](https://github.com/angular/angular.js/commit/17d34b7a983a0ef63f6cf404490385c696fb0da1)) - **orderBy:** guarantee stable sort ([e50ed4](https://github.com/angular/angular.js/commit/e50ed4da9e8177168f67da68bdf02f07da4e7bcf), [#14881](https://github.com/angular/angular.js/issues/14881), [#15914](https://github.com/angular/angular.js/issues/15914)) - **$parse:** - do not shallow-watch inputs to one-time intercepted expressions ([6e3b5a](https://github.com/angular/angular.js/commit/6e3b5a57cd921823f3eca7200a79ac5c2ef0567a)) - standardize one-time literal vs non-literal and interceptors ([f003d9](https://github.com/angular/angular.js/commit/f003d93a3dd052dccddef41125d9c51034ac3605)) - do not shallow-watch inputs when wrapped in an interceptor fn ([aac562](https://github.com/angular/angular.js/commit/aac5623247a86681cbe0e1c8179617b816394c1d), [#15905](https://github.com/angular/angular.js/issues/15905)) - always re-evaluate filters within literals when an input is an object ([ec9768](https://github.com/angular/angular.js/commit/ec97686f2f4a5481cc806462313a664fc7a1c893), [#15964](https://github.com/angular/angular.js/issues/15964), [#15990](https://github.com/angular/angular.js/issues/15990)) - **$sanitize:** use appropriate inert document strategy for Firefox and Safari ([8f31f1](https://github.com/angular/angular.js/commit/8f31f1ff43b673a24f84422d5c13d6312b2c4d94)) - **$timeout/$interval:** do not trigger a digest on cancel ([a222d0](https://github.com/angular/angular.js/commit/a222d0b452622624dc498ef0b9d3c43647fd4fbc), [#16057](https://github.com/angular/angular.js/issues/16057), [#16064](https://github.com/angular/angular.js/issues/16064))
This change might affect the use of `$timeout.flush()` in unit tests. See the commit message for more info. - **ngMock/$interval:** add support for zero-delay intervals in tests ([a1e3f8](https://github.com/angular/angular.js/commit/a1e3f8728e0a80396f980e48f8dc68dde6721b2b), [#15952](https://github.com/angular/angular.js/issues/15952), [#15953](https://github.com/angular/angular.js/issues/15953)) - **angular-loader:** do not depend on "closure" globals that may not be available ([a3226d](https://github.com/angular/angular.js/commit/a3226d01fadaf145713518dc5b8022b581c34e81), [#15880](https://github.com/angular/angular.js/issues/15880), [#15881](https://github.com/angular/angular.js/issues/15881)) ## New Features - **select:** expose info about selection state in controller ([0b962d](https://github.com/angular/angular.js/commit/0b962d4881e98327a91c37f7317da557aa991663), [#13172](https://github.com/angular/angular.js/issues/13172), [#10127](https://github.com/angular/angular.js/issues/10127)) - **$animate:** add support for `customFilter` ([ab114a](https://github.com/angular/angular.js/commit/ab114af8508bdbdb1fa5fd1e070d08818d882e28), [#14891](https://github.com/angular/angular.js/issues/14891)) - **$compile:** overload `.component()` to accept object map of components ([210112](https://github.com/angular/angular.js/commit/2101126ce72308d8fc468ca2411bb9972e614f79), [#14579](https://github.com/angular/angular.js/issues/14579), [#16062](https://github.com/angular/angular.js/issues/16062)) - **$log:** log all parameters in IE 9, not just the first two. ([3671a4](https://github.com/angular/angular.js/commit/3671a43be43d05b00c90dfb3a3f746c013139581)) - **ngMock:** describe unflushed http requests ([d9128e](https://github.com/angular/angular.js/commit/d9128e7b2371ab2bb5169ba854b21c78baa784d2), [#10596](https://github.com/angular/angular.js/issues/10596), [#15928](https://github.com/angular/angular.js/issues/15928)) ## Performance Improvements - **ngOptions:** prevent initial options repainting ([ff52b1](https://github.com/angular/angular.js/commit/ff52b188a759f2cc7ee6ee78a8c646c2354a47eb), [#15801](https://github.com/angular/angular.js/issues/15801), [#15812](https://github.com/angular/angular.js/issues/15812), [#16071](https://github.com/angular/angular.js/issues/16071)) - **$animate:** - avoid unnecessary computations if animations are globally disabled ([ce5ffb](https://github.com/angular/angular.js/commit/ce5ffbf667464bd58eae4c4af0917eb2685f1f6a), [#14914](https://github.com/angular/angular.js/issues/14914)) - do not retrieve `className` unless `classNameFilter` is used ([275978](https://github.com/angular/angular.js/commit/27597887379a1904cd86832602e286894b449a75)) # 1.6.4 phenomenal-footnote (2017-03-31) ## Bug Fixes - **$parse:** - standardize one-time literal vs non-literal and interceptors ([60394a](https://github.com/angular/angular.js/commit/60394a9d91dad8932fa900af7c8529837f1d4557), [#15858](https://github.com/angular/angular.js/issues/15858)) - fix infinite digest errors when watching objects with .valueOf in literals ([f5ddb1](https://github.com/angular/angular.js/commit/f5ddb10b56676c2ad912ce453acb87f0a7a94e01), [#15867](https://github.com/angular/angular.js/issues/15867)) - **ngModel:** prevent internal scope reference from being copied ([e1f8a6](https://github.com/angular/angular.js/commit/e1f8a6e82bb8a70079ef3db9a891b1c08b5bae31), [#15833](https://github.com/angular/angular.js/issues/15833)) - **jqLite:** make jqLite invoke jqLite.cleanData as a method ([9cde98](https://github.com/angular/angular.js/commit/9cde98cbc770f8d33fc074ba563b7ab6e2baaf8b), [#15846](https://github.com/angular/angular.js/issues/15846)) - **$http:** throw more informative error on invalid JSON response ([df8887](https://github.com/angular/angular.js/commit/df88873bb79213057057adb47151b626a7ec0e5d), [#15695](https://github.com/angular/angular.js/issues/15695), [#15724](https://github.com/angular/angular.js/issues/15724)) - **dateFilter:** correctly handle newlines in `format` string ([982271](https://github.com/angular/angular.js/commit/9822711ad2a401c2449239edc13d18b301714757), [#15794](https://github.com/angular/angular.js/issues/15794), [#15792](https://github.com/angular/angular.js/issues/15792)) ## New Features - **$resource:** add `hasBody` action configuration option ([a9f987](https://github.com/angular/angular.js/commit/a9f987a0c9653246ea471a89197907d94c0cea2a), [#10128](https://github.com/angular/angular.js/issues/10128), [#12181](https://github.com/angular/angular.js/issues/12181)) # 1.6.3 scriptalicious-bootstrapping (2017-03-08) ## Bug Fixes - **AngularJS:** - do not auto-bootstrap if the `src` exists but is empty ([3536e8](https://github.com/angular/angular.js/commit/3536e83d8a085b02bd6dcec8324800b7e6c734e4)) - do not auto bootstrap if the currentScript has been clobbered ([95f964](https://github.com/angular/angular.js/commit/95f964b827b6f5b5aab10af54f7831316c7a9935)) - do not auto-bootstrap if the script source is bad and inside SVG ([c8f78a](https://github.com/angular/angular.js/commit/c8f78a8ca9debc33a6deaf951f344b8d372bf210)) - **$log:** don't parse error stacks manually outside of IE/Edge ([64e5af](https://github.com/angular/angular.js/commit/64e5afc4786fdfd850c6bdb488a5aa2b8b077f74), [#15590](https://github.com/angular/angular.js/issues/15590), [#15767](https://github.com/angular/angular.js/issues/15767)) - **$sanitize:** prevent clobbered elements from freezing the browser ([3bb1dd](https://github.com/angular/angular.js/commit/3bb1dd5d7f7dcde6fea5a3148f8f10e92f451e9d), [#15699](https://github.com/angular/angular.js/issues/15699)) - **$animate:** - reset `classNameFilter` to `null` when a disallowed RegExp is used ([a584fb](https://github.com/angular/angular.js/commit/a584fb6e1569fc1dd85e23b251a7c126edc2dd5b), [#14913](https://github.com/angular/angular.js/issues/14913)) - improve detection on `ng-animate` in `classNameFilter` RegExp ([1f1331](https://github.com/angular/angular.js/commit/1f13313f403381581e1c31c57ebfe7a96546c6e4), [#14806](https://github.com/angular/angular.js/issues/14806)) - **filterFilter:** don't throw if `key.charAt` is not a function ([f27d19](https://github.com/angular/angular.js/commit/f27d19ed606bf05ba41698159ebbc5fbc195033e), [#15644](https://github.com/angular/angular.js/issues/15644), [#15660](https://github.com/angular/angular.js/issues/15660)) - **select:** - add attribute "selected" for `select[multiple]` ([851367](https://github.com/angular/angular.js/commit/8513674911300b27d518383a905fde9b3f25f7ae)) - keep original selection when using shift to add options in IE/Edge ([97b74a](https://github.com/angular/angular.js/commit/97b74ad6fbcbc4b63e37e9eb44962d6f8de83e8b), [#15675](https://github.com/angular/angular.js/issues/15675), [#15676](https://github.com/angular/angular.js/issues/15676)) - **$jsonpCallbacks:** allow `$window` to be mocked in unit tests ([5ca0de](https://github.com/angular/angular.js/commit/5ca0de64873c32ab2f540a3226e73c4175a15c50), [#15685](https://github.com/angular/angular.js/issues/15685), [#15686](https://github.com/angular/angular.js/issues/15686)) ## New Features - **info:** add `angularVersion` info to each module ([1e582e](https://github.com/angular/angular.js/commit/1e582e4fa486f340150bba95927f1b26d9142de2)) - **$injector:** add new `modules` property ([742123](https://github.com/angular/angular.js/commit/7421235f247e5b7113345401bc5727cfbf81ddc2)) - **Module:** add `info()` method ([09ba69](https://github.com/angular/angular.js/commit/09ba69078de6ba52c70571b82b6205929f6facc5), [#15225](https://github.com/angular/angular.js/issues/15225)) - **errorHandlingConfig:** make the depth for object stringification in errors configurable ([4a5eaf](https://github.com/angular/angular.js/commit/4a5eaf7bec85ceca8b934ebaff4d1834a1a09f57), [#15402](https://github.com/angular/angular.js/issues/15402), [#15433](https://github.com/angular/angular.js/issues/15433)) # 1.6.2 llamacorn-lovehug (2017-02-07) ## Bug Fixes - **$compile:** - do not swallow thrown errors in testsg ([0377c6](https://github.com/angular/angular.js/commit/0377c6f0e890cb4ed3eb020b96720b4b34f75df3), [#15629](https://github.com/angular/angular.js/issues/15629), [#15631](https://github.com/angular/angular.js/issues/15631)) - allow the usage of "$" in isolate scope property alias ([7f2af3](https://github.com/angular/angular.js/commit/7f2af3f923e7a3f85c8862d0ed57d21c72eae904), [#15594](https://github.com/angular/angular.js/issues/15594)) - **$location:** correctly handle external URL change during `$digest` ([b60761](https://github.com/angular/angular.js/commit/b607618342d6c4fab364966fe05f152be6bd4d5f), [#11075](https://github.com/angular/angular.js/issues/11075), [#12571](https://github.com/angular/angular.js/issues/12571), [#15556](https://github.com/angular/angular.js/issues/15556), [#15561](https://github.com/angular/angular.js/issues/15561)) - **$browser:** detect external changes in `history.state` ([fa50fb](https://github.com/angular/angular.js/commit/fa50fbaf57b3437be7a410ecaba7008dbe0ef239)) - **$resource:** - do not swallow errors in `success` callback ([27146e](https://github.com/angular/angular.js/commit/27146e8a7fad54c1342179b6d291b1b5c2ebe816), [#15624](https://github.com/angular/angular.js/issues/15624), [#15628](https://github.com/angular/angular.js/issues/15628)) - correctly unescape `/\.` even if `\.` comes from a param value ([419a48](https://github.com/angular/angular.js/commit/419a4813e354496bdf0df44e3f8afaa198df1ab1), [#15627](https://github.com/angular/angular.js/issues/15627)) - delete `$cancelRequest()` in `toJSON()` ([086c5d](https://github.com/angular/angular.js/commit/086c5d0354db8cb3d106b9ff966fb48d6fb46ef8), [#15244](https://github.com/angular/angular.js/issues/15244)) - **$animate:** correctly animate transcluded clones with `templateUrl` ([f01212](https://github.com/angular/angular.js/commit/f01212ab5287ac7a154da7d75037ed444e81eb34), [#15510](https://github.com/angular/angular.js/issues/15510), [#15514](https://github.com/angular/angular.js/issues/15514)) - **$route:** make asynchronous tasks count as pending requests ([eb968c](https://github.com/angular/angular.js/commit/eb968c4a6884838db05369a04459066424c5bba8), [#14159](https://github.com/angular/angular.js/issues/14159)) - **$parse:** make sure ES6 object computed properties are watched ([5e418b](https://github.com/angular/angular.js/commit/5e418b1145a1045da598c7863e785d647ea83850), [#15678](https://github.com/angular/angular.js/issues/15678)) - **$sniffer:** allow `history` for NW.js apps ([4a593d](https://github.com/angular/angular.js/commit/4a593db79ba1e21a6aa600a82cf6d757cad94d01), [#15474](https://github.com/angular/angular.js/issues/15474), [#15633](https://github.com/angular/angular.js/issues/15633)) - **input:** fix `step` validation for `input[type=number/range]` ([c95a67](https://github.com/angular/angular.js/commit/c95a6737fbd277e40c064bd9f68f383bf119505c), [#15504](https://github.com/angular/angular.js/issues/15504), [#15506](https://github.com/angular/angular.js/issues/15506)) - **select:** keep `ngModel` when selected option is recreated by `ngRepeat` ([131af8](https://github.com/angular/angular.js/commit/131af8272d269a541d04cb522c264a91e0ec8b6a), [#15630](https://github.com/angular/angular.js/issues/15630), [#15632](https://github.com/angular/angular.js/issues/15632)) - **ngValue:** correctly update the `value` property when `value` is undefined ([05aab6](https://github.com/angular/angular.js/commit/05aab660ce74f526f2110d3b5faf9a5b4f4e664b) [#15603](https://github.com/angular/angular.js/issues/15603), [#15605](https://github.com/angular/angular.js/issues/15605)) - **angularInit:** allow auto-bootstrapping from inline script ([bb464d](https://github.com/angular/angular.js/commit/bb464d16b434b9e2de2fecf80c192d4741cba879), [#15567](https://github.com/angular/angular.js/issues/15567), [#15571](https://github.com/angular/angular.js/issues/15571)) - **ngMockE2E:** ensure that mocked `$httpBackend` uses correct `$browser` ([bd63b2](https://github.com/angular/angular.js/commit/bd63b2235cd410251cb83eebd9a47d3102830b6b), [#15593](https://github.com/angular/angular.js/issues/15593)) ## New Features - **ngModel:** add `$overrideModelOptions` support ([2546c2](https://github.com/angular/angular.js/commit/2546c29f811b68eea4d68be7fa1c8f7bb562dc11), [#15415](https://github.com/angular/angular.js/issues/15415)) - **$parse:** allow watching array/object literals with non-primitive values ([25f008](https://github.com/angular/angular.js/commit/25f008f541d68b09efd7b428b648c6d4899e6972), [#15301](https://github.com/angular/angular.js/issues/15301)) # 1.5.11 princely-quest (2017-01-13) ## Bug Fixes - **$compile:** allow the usage of "$" in isolate scope property alias ([e75fbc](https://github.com/angular/angular.js/commit/e75fbc494e6a0da6a9231b40bb0382431b62be07), [#15586](https://github.com/angular/angular.js/issues/15586), [#15594](https://github.com/angular/angular.js/issues/15594)) - **angularInit:** allow auto-bootstraping from inline script ([41aa91](https://github.com/angular/angular.js/commit/41aa9125b9aaf771addb250642f524a4e6f9d8d3), [#15567](https://github.com/angular/angular.js/issues/15567), [#15571](https://github.com/angular/angular.js/issues/15571)) - **$resource:** delete `$cancelRequest()` in `toJSON()` ([4f3858](https://github.com/angular/angular.js/commit/4f3858e7c371f87534397f45b9d002add33b00cc), [#15244](https://github.com/angular/angular.js/issues/15244)) - **$$cookieReader:** correctly handle forbidden access to `document.cookie` ([6933cf](https://github.com/angular/angular.js/commit/6933cf64fe51f54b10d1639f2b95bab3c1178df9), [#15523](https://github.com/angular/angular.js/issues/15523), [#15532](https://github.com/angular/angular.js/issues/15532)) # 1.6.1 promise-rectification (2016-12-23) ## Bug Fixes - **$q:** Add traceback to unhandled promise rejections ([174cb4](https://github.com/angular/angular.js/commit/174cb4a8c81e25581da5b452c2bb43b0fa377a9b), [#14631](https://github.com/angular/angular.js/issues/14631)) - **$$cookieReader:** correctly handle forbidden access to `document.cookie` ([33f769](https://github.com/angular/angular.js/commit/33f769b0a1214055c16fb59adad4897bf53d62bf), [#15523](https://github.com/angular/angular.js/issues/15523)) - **ngOptions:** do not unset the `selected` property unless necessary ([bc4844](https://github.com/angular/angular.js/commit/bc4844d3b297d80aecef89aa1b32615024decedc), [#15477](https://github.com/angular/angular.js/issues/15477)) - **ngModelOptions:** work correctly when on the template of `replace` directives ([5f8ed6](https://github.com/angular/angular.js/commit/5f8ed63f2ab02ffb9c21bf9c29d27c851d162e26), [#15492](https://github.com/angular/angular.js/issues/15492)) - **ngClassOdd/Even:** add/remove the correct classes when expression/`$index` change simultaneously ([d52864](https://github.com/angular/angular.js/commit/d528644fe3e9ffd43999e7fc67806059f9e1083e)) - **jqLite:** silently ignore `after()` if element has no parent ([3d68b9](https://github.com/angular/angular.js/commit/3d68b9502848ff6714ef89bfb95b8e70ae34eff6), [#15331](https://github.com/angular/angular.js/issues/15331), [#15475](https://github.com/angular/angular.js/issues/15475)) - **$rootScope:** when adding/removing watchers during $digest ([163aca](https://github.com/angular/angular.js/commit/163aca336d7586a45255787af41b14b2a12361dd), [#15422](https://github.com/angular/angular.js/issues/15422)) ## Performance Improvements - **ngClass:** avoid unnecessary `.data()` accesses, deep-watching and copies ([1d3b65](https://github.com/angular/angular.js/commit/1d3b65adc2c22ff662159ef910089cf10d1edb7b), [#14404](https://github.com/angular/angular.js/issues/14404)) # 1.5.10 asynchronous-synchronization (2016-12-15) ## Bug Fixes - **$compile:** - don't throw tplrt error when there is whitespace around a top-level comment ([12752f](https://github.com/angular/angular.js/commit/12752f66ac425ab38a5ee574a4bfbf3516adc42c), [#15108](https://github.com/angular/angular.js/issues/15108)) - clean up `@`-binding observers when re-assigning bindings ([f3cb6e](https://github.com/angular/angular.js/commit/f3cb6e309aa1f676e5951ac745fa886d3581c2f4), [#15268](https://github.com/angular/angular.js/issues/15268)) - set attribute value even if `ngAttr*` contains no interpolation ([229799](https://github.com/angular/angular.js/commit/22979904fb754c59e9f6ee5d8763e3b8de0e18c2), [#15133](https://github.com/angular/angular.js/issues/15133)) - `bindToController` should work without `controllerAs` ([944989](https://github.com/angular/angular.js/commit/9449893763a4fd95ee8ff78b53c6966a874ec9ae), [#15088](https://github.com/angular/angular.js/issues/15088)) - do not overwrite values set in `$onInit()` for `<`-bound literals ([07e1ba](https://github.com/angular/angular.js/commit/07e1ba365fb5e8a049be732bd7b62f71e0aa1672), [#15118](https://github.com/angular/angular.js/issues/15118)) - avoid calling `$onChanges()` twice for `NaN` initial values ([0cf5be](https://github.com/angular/angular.js/commit/0cf5be52642f7e9d81a708b3005042eac6492572)) - **$location:** prevent infinite digest with IDN urls in Edge ([4bf892](https://github.com/angular/angular.js/commit/4bf89218130d434771089fdfe643490b8d2ee259), [#15217](https://github.com/angular/angular.js/issues/15217)) - **$rootScope:** correctly handle adding/removing watchers during `$digest` ([a9708d](https://github.com/angular/angular.js/commit/a9708de84b50f06eacda33834d5bbdfc97c97f37), [#15422](https://github.com/angular/angular.js/issues/15422)) - **$sce:** fix `adjustMatcher` to replace multiple `*` and `**` ([78eecb](https://github.com/angular/angular.js/commit/78eecb43dbb0500358d333aea8955bd0646a7790)) - **jqLite:** silently ignore `after()` if element has no parent ([77ed85](https://github.com/angular/angular.js/commit/77ed85bcd3be057a5a79231565ac7accc6d644c6), [#15331](https://github.com/angular/angular.js/issues/15331)) - **input[radio]:** use non-strict comparison for checkedness ([593a50](https://github.com/angular/angular.js/commit/593a5034841b3b7661d3bcbdd06b7a9d0876fd34)) - **select, ngOptions:** - let `ngValue` take precedence over option text with multiple interpolations ([5b7ec8](https://github.com/angular/angular.js/commit/5b7ec8c84e88ee08aacaf9404853eda0016093f5), [#15413](https://github.com/angular/angular.js/issues/15413)) - don't add comment nodes as empty options ([1d29c9](https://github.com/angular/angular.js/commit/1d29c91c3429de96e4103533752700d1266741be), [#15454](https://github.com/angular/angular.js/issues/15454)) - **ngClassOdd/Even:** add/remove the correct classes when expression/`$index` change simultaneously ([e3d020](https://github.com/angular/angular.js/commit/e3d02070ab8a02c818dcc5114db6fba9d3f385d6)) - **$sanitize:** reduce stack height in IE <= 11 ([862dc2](https://github.com/angular/angular.js/commit/862dc2532f8126a4a71fd3d957884ba6f11f591c), [#14928](https://github.com/angular/angular.js/issues/14928)) - **ngMock/$controller:** respect `$compileProvider.preAssignBindingsEnabled()` ([75c83f](https://github.com/angular/angular.js/commit/75c83ff3195931859a099f7a95bf81d32abf2eb3)) ## New Features - **bootstrap:** do not bootstrap from unknown schemes with a different origin ([bdeb33](https://github.com/angular/angular.js/commit/bdeb3392a8719131ab2b993f2a881c43a2860f92), [#15428](https://github.com/angular/angular.js/issues/15428)) - **$anchorScroll:** convert numeric hash targets to string ([a52640](https://github.com/angular/angular.js/commit/a5264090b66ad0cf9a93de84bb7b307868c0edef), [#14680](https://github.com/angular/angular.js/issues/14680)) - **$compile:** - add `preAssignBindingsEnabled` option ([f86576](https://github.com/angular/angular.js/commit/f86576def44005f180a66e3aa12d6cc73c1ac72c)) - throw error when directive name or factory function is invalid ([5c9399](https://github.com/angular/angular.js/commit/5c9399d18ae5cd79e6cf6fc4377d66df00f6fcc7), [#15056](https://github.com/angular/angular.js/issues/15056)) - **$controller:** throw when requested controller is not registered ([9ae793](https://github.com/angular/angular.js/commit/9ae793d8a69afe84370b601e07fc375fc18a576a), [#14980](https://github.com/angular/angular.js/issues/14980)) - **$location:** add support for selectively rewriting links based on attribute ([a4a222](https://github.com/angular/angular.js/commit/a4a22266f127d3b9a6818e6f4754f048e253f693)) - **$resource:** pass `status`/`statusText` to success callbacks ([a8da25](https://github.com/angular/angular.js/commit/a8da25c74d2c1f6265f0fafd95bf72c981d9d678), [#8341](https://github.com/angular/angular.js/issues/8841), [#8841](https://github.com/angular/angular.js/issues/8841)) - **ngSwitch:** allow multiple case matches via optional attribute `ngSwitchWhenSeparator` ([0e1651](https://github.com/angular/angular.js/commit/0e1651bfd28ba73ebd0e4943d85af48c4506e02c), [#3410](https://github.com/angular/angular.js/issues/3410), [#3516](https://github.com/angular/angular.js/issues/3516)) ## Performance Improvements - **all:** don't trigger digests after enter/leave of structural directives ([c57779](https://github.com/angular/angular.js/commit/c57779d8725493c5853dceda0105dafd5c0e3a7c), [#15322](https://github.com/angular/angular.js/issues/15322)) - **$compile:** validate `directive.restrict` property on directive init ([31d464](https://github.com/angular/angular.js/commit/31d464feef38b1cc950da6c8dccd0f194ebfc68b)) - **ngOptions:** avoid calls to `element.value` ([e269ad](https://github.com/angular/angular.js/commit/e269ad1244bc50fee9218f7c18fab3e9ab063aab)) - **jqLite:** move bind/unbind definitions out of the loop ([7717b9](https://github.com/angular/angular.js/commit/7717b96e950a5916a5f12fd611c73d3b06a8d717)) # 1.6.0 rainbow-tsunami (2016-12-08) **Here are the full changes for the release of 1.6.0 that are not already released in the 1.5.x branch, consolidating all the changes shown in the previous 1.6.0 release candidates.** ## New Features - **ngModelOptions:** allow options to be inherited from ancestor `ngModelOptions` ([296cfc](https://github.com/angular/angular.js/commit/296cfce40c25e9438bfa46a0eb27240707a10ffa), [#10922](https://github.com/angular/angular.js/issues/10922)) - **$compile:** - add `preAssignBindingsEnabled` option ([dfb8cf](https://github.com/angular/angular.js/commit/dfb8cf6402678206132e5bc603764d21e0f986ef)) - set `preAssignBindingsEnabled` to false by default ([bcd0d4](https://github.com/angular/angular.js/commit/bcd0d4d896d0dfdd988ff4f849c1d40366125858), [#15352](https://github.com/angular/angular.js/issues/15352)) - throw error when directive name or factory function is invalid ([53a3bf](https://github.com/angular/angular.js/commit/53a3bf6634600c3aeff092eacc35edf399b27aec) [#15056](https://github.com/angular/angular.js/issues/15056)) - **jqLite:** - implement `jqLite(f)` as an alias to `jqLite(document).ready(f)` ([369fb7](https://github.com/angular/angular.js/commit/369fb7f4f73664bcdab0350701552d8bef6f605e)) - don't throw for elements with missing `getAttribute` ([4e6c14](https://github.com/angular/angular.js/commit/4e6c14dcae4a9a30b3610a288ef8d20db47c4417)) - don't get/set properties when getting/setting boolean attributes ([7ceb5f](https://github.com/angular/angular.js/commit/7ceb5f6fcc43d35d1b66c3151ce6a71c60309304), [#14126](https://github.com/angular/angular.js/issues/14126)) - don't remove a boolean attribute for `.attr(attrName, '')` ([3faf45](https://github.com/angular/angular.js/commit/3faf4505732758165083c9d21de71fa9b6983f4a)) - remove the attribute for `.attr(attribute, null)` ([4e3624](https://github.com/angular/angular.js/commit/4e3624552284d0e725bf6262b2e468cd2c7682fa)) - return `[]` for `.val()` on ` ``` The migration strategy is to convert values that matched with non-strict conversion so that they will match with strict conversion. - **feat(ngModelOptions): allow options to be inherited from ancestor `ngModelOptions` ([296cfc](https://github.com/angular/angular.js/commit/296cfce40c25e9438bfa46a0eb27240707a10ffa))**: The programmatic API for `ngModelOptions` has changed. You must now read options via the `ngModelController.$options.getOption(name)` method, rather than accessing the option directly as a property of the `ngModelContoller.$options` object. This does not affect the usage in templates and only affects custom directives that might have been reading options for their own purposes. One benefit of these changes, though, is that the `ngModelControler.$options` property is now guaranteed to be defined so there is no need to check before accessing. So, previously: ``` var myOption = ngModelController.$options && ngModelController.$options['my-option']; ``` and now: ``` var myOption = ngModelController.$options.getOption('my-option'); ``` ### **jqLite** due to: - **[fc0c11](https://github.com/angular/angular.js/commit/fc0c11db845d53061430b7f05e773dcb3fb5b860)**: camelCase keys in `jqLite#data` Previously, keys passed to the data method were left untouched. Now they are internally camelCased similarly to how jQuery handles it, i.e. only single (!) hyphens followed by a lowercase letter get converted to an uppercase letter. This means keys `a-b` and `aB` represent the same data piece; writing to one of them will also be reflected if you ask for the other one. If you use Angular with jQuery, it already behaved in this way so no changes are required on your part. To migrate the code follow the examples below: BEFORE: ```js /* 1 */ elem.data('my-key', 2); elem.data('myKey', 3); /* 2 */ elem.data('foo-bar', 42); elem.data()['foo-bar']; // 42 elem.data()['fooBar']; // undefined /* 3 */ elem.data()['foo-bar'] = 1; elem.data()['fooBar'] = 2; elem.data('foo-bar'); // 1 ``` AFTER: ```js /* 1 */ // Rename one of the keys as they would now map to the same data slot. elem.data('my-key', 2); elem.data('my-key2', 3); /* 2 */ elem.data('foo-bar', 42); elem.data()['foo-bar']; // undefined elem.data()['fooBar']; // 42 /* 3 */ elem.data()['foo-bar'] = 1; elem.data()['fooBar'] = 2; elem.data('foo-bar'); // 2 ``` - **[73050c](https://github.com/angular/angular.js/commit/73050cdda04675bfa6705dc841ddbbb6919eb048)**: align jqLite camelCasing logic with JQuery Before, when Angular was used without jQuery, the key passed to the css method was more heavily camelCased; now only a single (!) hyphen followed by a lowercase letter is getting transformed. This also affects APIs that rely on the css method, like ngStyle. If you use Angular with jQuery, it already behaved in this way so no changes are needed on your part. To migrate the code follow the example below: Before: HTML: ```html // All five versions used to be equivalent.
``` JS: ```js // All five versions used to be equivalent. elem.css('background_color', 'blue'); elem.css('background:color', 'blue'); elem.css('background-color', 'blue'); elem.css('background--color', 'blue'); elem.css('backgroundColor', 'blue'); // All five versions used to be equivalent. var bgColor = elem.css('background_color'); var bgColor = elem.css('background:color'); var bgColor = elem.css('background-color'); var bgColor = elem.css('background--color'); var bgColor = elem.css('backgroundColor'); ``` After: HTML: ```html // Previous five versions are no longer equivalent but these two still are.
``` JS: ```js // Previous five versions are no longer equivalent but these two still are. elem.css('background-color', 'blue'); elem.css('backgroundColor', 'blue'); // Previous five versions are no longer equivalent but these two still are. var bgColor = elem.css('background-color'); var bgColor = elem.css('backgroundColor'); ``` - **[7ceb5f](https://github.com/angular/angular.js/commit/7ceb5f6fcc43d35d1b66c3151ce6a71c60309304)**: don't get/set properties when getting/setting boolean attributes Previously, all boolean attributes were reflected into the corresponding property when calling a setter and from the corresponding property when calling a getter, even on elements that don't treat those attributes in a special way. Now Angular doesn't do it by itself, but relies on browsers to know when to reflect the property. Note that this browser-level conversion differs between browsers; if you need to dynamically change the state of an element, you should modify the property, not the attribute. See https://jquery.com/upgrade-guide/1.9/#attr-versus-prop- for a more detailed description about a related change in jQuery 1.9. This change aligns jqLite with jQuery 3. To migrate the code follow the example below: Before: CSS: ```css input[checked="checked"] { ... } ``` JS: ```js elem1.attr('checked', 'checked'); elem2.attr('checked', false); ``` After: CSS: ```css input:checked { ... } ``` JS: ```js elem1.prop('checked', true); elem2.prop('checked', false); ``` - **[3faf45](https://github.com/angular/angular.js/commit/3faf4505732758165083c9d21de71fa9b6983f4a)**: don't remove a boolean attribute for `.attr(attrName, '')` Before, using the `attr` method with an empty string as a value would remove the boolean attribute. Now it sets it to its lowercase name as was happening for every non-empty string so far. The only two values that remove the boolean attribute are now null & false, just like in jQuery. To migrate the code follow the example below: Before: ```js elem.attr(booleanAttrName, ''); ``` After: ```js elem.attr(booleanAttrName, false); ``` or: ```js elem.attr(booleanAttrName, null); ``` - **[4e3624](https://github.com/angular/angular.js/commit/4e3624552284d0e725bf6262b2e468cd2c7682fa)**: remove the attribute for `.attr(attribute, null)` Invoking `elem.attr(attributeName, null)` would set the `attributeName` attribute value to a string `"null"`, now it removes the attribute instead. To migrate the code follow the example below: Before: ```js elem.attr(attributeName, null); ``` After: ```js elem.attr(attributeName, "null"); ``` - **[d882fd](https://github.com/angular/angular.js/commit/d882fde2e532216e7cf424495db1ccb5be1789f8)**: return [] for .val() on ` ``` JavaScript: ```js var value = $element.val(); if (value) { /* do something */ } ``` After: HTML: ```html ``` JavaScript: ```js var value = $element.val(); if (value.length > 0) { /* do something */ } ``` ### `ngModel` due to: - **[7bc71a](https://github.com/angular/angular.js/commit/7bc71adc63bb6bb609b44dd2d3ea8fb0cd3f300b)**: treat synchronous validators as boolean always Previously, only a literal `false` return would resolve as the synchronous validator failing. Now, all falsy JavaScript values are treated as failing the validator, as one would naturally expect. Specifically, the values `0` (the number zero), `null`, `NaN` and `''` (the empty string) used to be considered valid (passing) and they are now considered invalid (failing). The value `undefined` was treated similarly to a pending asynchronous validator, causing the validation to be pending. `undefined` is also now considered invalid. To migrate, make sure your synchronous validators are returning either a literal `true` or a literal `false` value. For most code, we expect this to already be the case. Only a very small subset of projects will be affected. Namely, anyone using `undefined` or any falsy value as a return will now see their validation failing, whereas previously falsy values other than `undefined` would have been seen as passing and `undefined` would have been seen as pending. - **[9e24e7](https://github.com/angular/angular.js/commit/9e24e774a558143b3478536911a3a4c1714564ba)**: change controllers to use prototype methods The use of prototype methods instead of new methods per instance removes the ability to pass NgModelController and FormController methods without context. For example ```js $scope.$watch('something', myNgModelCtrl.$render) ``` will no longer work because the `$render` method is passed without any context. This must now be replaced with ```js $scope.$watch('something', function() { myNgModelCtrl.$render(); }) ``` or possibly by using `Function.prototype.bind` or `angular.bind`. ### `aria/ngModel` due to: - **[975a61](https://github.com/angular/angular.js/commit/975a6170efceb2a5e6377c57329731c0636eb8c8)**: do not overwrite the default `$isEmpty()` method for checkboxes Custom `checkbox`-shaped controls (e.g. checkboxes, menuitemcheckboxes), no longer have a custom `$isEmpty()` method on their `NgModelController` that checks for `value === false`. Unless overwritten, the default `$isEmpty()` method will be used, which treats `undefined`, `null`, `NaN` and `''` as "empty". **Note:** The `$isEmpty()` method is used to determine if the checkbox is checked ("not empty" means "checked") and thus it can indirectly affect other things, such as the control's validity with respect to the `required` validator (e.g. "empty" + "required" --> "invalid"). Before: ```js var template = ''; var customCheckbox = $compile(template)(scope); var ctrl = customCheckbox.controller('ngModel'); scope.$apply('value = false'); console.log(ctrl.$isEmpty()); //--> true scope.$apply('value = true'); console.log(ctrl.$isEmpty()); //--> false scope.$apply('value = undefined'/* or null or NaN or '' */); console.log(ctrl.$isEmpty()); //--> false ``` After: ```js var template = ''; var customCheckbox = $compile(template)(scope); var ctrl = customCheckbox.controller('ngModel'); scope.$apply('value = false'); console.log(ctrl.$isEmpty()); //--> false scope.$apply('value = true'); console.log(ctrl.$isEmpty()); //--> false scope.$apply('value = undefined'/* or null or NaN or '' */); console.log(ctrl.$isEmpty()); //--> true ``` -- If you want to have a custom `$isEmpty()` method, you need to overwrite the default. For example: ```js .directive('myCheckbox', function myCheckboxDirective() { return { require: 'ngModel', link: function myCheckboxPostLink(scope, elem, attrs, ngModelCtrl) { ngModelCtrl.$isEmpty = function myCheckboxIsEmpty(value) { return !value; // Any falsy value means "empty" // Or to restore the previous behavior: // return value === false; }; } }; }) ``` ### `$http` due to: - **[b54a39](https://github.com/angular/angular.js/commit/b54a39e2029005e0572fbd2ac0e8f6a4e5d69014)**: remove deprecated callback methods: `success()/error()` `$http`'s deprecated custom callback methods - `success()` and `error()` - have been removed. You can use the standard `then()`/`catch()` promise methods instead, but note that the method signatures and return values are different. `success(fn)` can be replaced with `then(fn)`, and `error(fn)` can be replaced with either `then(null, fn)` or `catch(fn)`. Before: ```js $http(...). success(function onSuccess(data, status, headers, config) { // Handle success ... }). error(function onError(data, status, headers, config) { // Handle error ... }); ``` After: ```js $http(...). then(function onSuccess(response) { // Handle success var data = response.data; var status = response.status; var statusText = response.statusText; var headers = response.headers; var config = response.config; ... }, function onError(response) { // Handle error var data = response.data; var status = response.status; var statusText = response.statusText; var headers = response.headers; var config = response.config; ... }); // or $http(...). then(function onSuccess(response) { // Handle success var data = response.data; var status = response.status; var statusText = response.statusText; var headers = response.headers; var config = response.config; ... }). catch(function onError(response) { // Handle error var data = response.data; var status = response.status; var statusText = response.statusText; var headers = response.headers; var config = response.config; ... }); ``` **Note:** There is a subtle difference between the variations showed above. When using `$http(...).success(onSuccess).error(onError)` or `$http(...).then(onSuccess, onError)`, the `onError()` callback will only handle errors/rejections produced by the `$http()` call. If the `onSuccess()` callback produces an error/rejection, it won't be handled by `onError()` and might go unnoticed. In contrast, when using `$http(...).then(onSuccess).catch(onError)`, `onError()` will handle errors/rejections produced by both `$http()` _and_ `onSuccess()`. - **[fb6634](https://github.com/angular/angular.js/commit/fb663418710736161a6b5da49c345e92edf58dcb)**: JSONP callback must be specified by `jsonpCallbackParam` config You can no longer use the `JSON_CALLBACK` placeholder in your JSONP requests. Instead you must provide the name of the query parameter that will pass the callback via the `jsonpCallbackParam` property of the config object, or app-wide via the `$http.defaults.jsonpCallbackParam` property, which is `"callback"` by default. Before this change: ```js $http.json('trusted/url?callback=JSON_CALLBACK'); $http.json('other/trusted/url', {params: {cb:'JSON_CALLBACK'}}); ``` After this change: ```js $http.json('trusted/url'); $http.json('other/trusted/url', {jsonpCallbackParam:'cb'}); ``` - **[6476af](https://github.com/angular/angular.js/commit/6476af83cd0418c84e034a955b12a842794385c4)**: JSONP requests now require a trusted resource URL All JSONP requests now require the URL to be trusted as resource URLs. There are two approaches to trust a URL: **Whitelisting with the `$sceDelegateProvider.resourceUrlWhitelist()` method.** You configure this list in a module configuration block: ```js appModule.config(['$sceDelegateProvider', function($sceDelegateProvider) { $sceDelegateProvider.resourceUrlWhitelist([ // Allow same origin resource loads. 'self', // Allow JSONP calls that match this pattern 'https://some.dataserver.com/**.jsonp?**' ]); }]); ``` **Explicitly trusting the URL via the `$sce.trustAsResourceUrl(url)` method.** You can pass a trusted object instead of a string as a URL to the `$http` service: ```js var promise = $http.jsonp($sce.trustAsResourceUrl(url)); ``` - **[4f6f2b](https://github.com/angular/angular.js/commit/4f6f2bce4ac93b85320e42e5023c09d099779b7d)**: properly increment/decrement `$browser.outstandingRequestCount` HTTP requests now update the outstanding request count synchronously. Previously the request count would not have been updated until the request to the server is actually in flight. Now the request count is updated before the async interceptor is called. The new behaviour is correct but it may change the expected behaviour in a small number of e2e test cases where an async request interceptor is being used. ### `$q` due to: - **[e13eea](https://github.com/angular/angular.js/commit/e13eeabd7e34a78becec06cfbe72c23f2dcb85f9)**: treat thrown errors as regular rejections Previously, throwing an error from a promise's `onFulfilled` or `onRejection` handlers, would result in passing the error to the `$exceptionHandler()` (in addition to rejecting the promise with the error as reason). Now, a thrown error is treated exactly the same as a regular rejection. This applies to all services/controllers/filters etc that rely on `$q` (including built-in services, such as `$http` and `$route`). For example, `$http`'s `transformRequest/Response` functions or a route's `redirectTo` function as well as functions specified in a route's `resolve` object, will no longer result in a call to `$exceptionHandler()` if they throw an error. Other than that, everything will continue to behave in the same way; i.e. the promises will be rejected, route transition will be cancelled, `$routeChangeError` events will be broadcasted etc. - **[c9dffd](https://github.com/angular/angular.js/commit/c9dffde1cb167660120753181cb6d01dc1d1b3d0)**: report promises with non rejection callback Unhandled rejected promises will be logged to $exceptionHandler. Tests that depend on specific order or number of messages in $exceptionHandler will need to handle rejected promises report. ### `ngTransclude` due to: - **[32aa7e](https://github.com/angular/angular.js/commit/32aa7e7395527624119e3917c54ee43b4d219301)**: use fallback content if only whitespace is provided Previously whitespace only transclusion would be treated as the transclusion being "not empty", which meant that fallback content was not used in that case. Now if you only provide whitespace as the transclusion content, it will be assumed to be empty and the fallback content will be used instead. If you really do want whitespace then you can force it to be used by adding a comment to the whitespace. Previously this would not fallback to default content: ```html ``` Now the whitespace between the opening and closing tags is treated as empty. To force the previous behaviour simply add a comment: ```html ``` ### `$compile` due to: - **[13c252](https://github.com/angular/angular.js/commit/13c2522baf7c8f616b2efcaab4bffd54c8736591)**: correctly merge consecutive text nodes on IE11 **Note:** Everything described below affects **IE11 only**. Previously, consecutive text nodes would not get merged if they had no parent. They will now, which might have unexpected side effects in the following cases: 1. Passing an array or jqLite/jQuery collection of parent-less text nodes to `$compile` directly: ```js // Assuming: var textNodes = [ document.createTextNode('{{'), document.createTextNode('"foo:"'), document.createTextNode('}}') ]; var compiledNodes = $compile(textNodes)($rootScope); // Before: console.log(compiledNodes.length); // 3 console.log(compiledNodes.text()); // {{'foo'}} // After: console.log(compiledNodes.length); // 1 console.log(compiledNodes.text()); // foo // To get the old behavior, compile each node separately: var textNodes = [ document.createTextNode('{{'), document.createTextNode('"foo"'), document.createTextNode('}}') ]; var compiledNodes = angular.element(textNodes.map(function (node) { return $compile(node)($rootScope)[0]; })); ``` 2. Using multi-slot transclusion with non-consecutive, default-content text nodes (that form interpolated expressions when merged): ```js // Assuming the following component: .component('someThing', { template: '' transclude: { ignored: 'veryImportantContent' } }) ``` ```html {{ Nooot 'foo'}} {{ <-- Two separate 'foo'}} <-- text nodes foo <-- The text nodes were merged into `{{'foo'}}`, which was then interpolated {{ Nooot 'foo'}} {{ <-- Two separate 'foo'}} <-- nodes ``` - **[b89c21](https://github.com/angular/angular.js/commit/b89c2181a9a165e06c027390164e08635ec449f4)**: move check for interpolation of `on-"event"` attributes to compile time Using interpolation in any on* event attributes (e.g. `