angular.js v0.10.6 Release Notes

Release Date: 2012-01-17 // over 12 years ago
  • ๐Ÿ”‹ Features:

    • [Dependency injection subsystem][guide2.di] rewrite. This is a huge change to the Angular core that was necessary for many reasons. Please read the full design doc to understand the changes and reasoning behind them.
    • โž• Added [angular.bootstrap] for manual bootstrapping of the app. Also see [Initializing Angular App][bootstrapping] doc.
    • โœ… Helper functions [inject] and [module] that make testing with DI and jasmine a lot easier.
    • [jqLite][jqLite2] and jQuery were extended with helper method injector() that simplifies the access to the application injector during debugging.
    • Rewrite of $xhr service and its dependencies, which was replaced with [$http] service. The $browser.xhr and its mock were replaced by [$httpBackend] and its [unit testing][unit-testing $httpBackend] and [end-to-end testing][e2e-testing $httpBackend] mocks. The $resource service api and functionality was preserved, with the exception of caching, which is not happening automatically as it used it in the past (verifyCache has no effect).
    • [$q] - Q-like deferred/promise implementation (commit)
    • Transparent data-binding to promises in templates. Example (commit)
    • ๐Ÿ†• New [$anchorScroll] service that watches url hash and navigates to the html anchor even if the content was loaded via [ng:view] (for [ng:include] you have to opt into this behavior using autoscroll attribute)
    • ๐Ÿ†• New LRU cache factory - [$cacheFactory] service
    • jQuery 1.7 compatibility

    ๐Ÿ› Bug Fixes:

    • Directive names are now case insensitive (commit)
    • $location#url setter fix (Issue #648)
    • [ng:include] - prevent race conditions by ignoring stale http callbacks (commit)
    • ๐Ÿ‘ [ng:repeat] - support repeating over array with null (commit)
    • [angular.copy] - throw Error if source and destination are identical (commit)
    • Forms should not prevent POST submission if the action attribute is present (commit)

    ๐Ÿ’ฅ Breaking Changes:

    • ๐Ÿ‘€ App bootstrapping works differently (see [angular.bootstrap] and [ng:app] and [bootstrapping])
    • scope.$service is no more (because injector creates scope and not the other way around), if you really can't get services injected and need to fetch them manually then, get hold of [$injector] service and call $injector.get('serviceId')
    • ๐Ÿ’… angular.service style service registration was replaced with module system, please see [angular.module] api and [DI documentation][guide2.di] for more info.
    • the $xhr service was replaced with [$http] with promise based apis.
    • โœ… [unit-testing $httpBackend]'s expect method (the replacement for $browser.xhr.expect) is stricter - the order of requests matters and a single request expectation can handle only a single request.
    • compiler
      • compiler is a service, so use [$compile] instead of angular.compile to compile templates
      • $compile (nee angular.compile) returns the linking function which takes one mandatory argument - the scope. previously this argument was optional and if missing, the compiler would create a new root scope, this was a source of bugs and was removed
    • filters
      • filters need to be registered either via [moduleName.filter][angular.Module] or [$filterProvider.filter][$filterProvider]
      • filters don't have access to the dom element
      • currency filter doesn't make negative values red
      • json filter doesn't print out stuff in monospace
    • type augmentation via angular.Array, and angular.Object is gone. As a replacement use filters ([filter], [limitTo], [orderBy]), ES5 apis (e.g. Array#indexOf), or create custom filters (e.g. as a replacement for $count and $sum).
    • ๐Ÿ’ป [$browser.defer.flush] now throws an exception when queue is empty (commit)
    • ๐Ÿ‘ป scope.$apply and scope.$digest throws an exception if called while $apply or $digest is already in progress (this is a programming error, you should never need to do this) (commit)