aboutsummaryrefslogtreecommitdiffstats
path: root/src/services.js
AgeCommit message (Collapse)Author
2011-01-10fixing missing dependencyIgor Minar
2011-01-10Rename angular.foreach to angular.forEach to make the api consistent.Igor Minar
camelcase is used for other angular functions and forEach is also used by EcmaScript standard. - rename the internal as well as the external function name - tweak the implementation of the function so that it doesn't clober it self when we extend the angular object with an object that has a forEach property equal to this forEach function Closes #85
2011-01-10fix for IE free function weirdnessMisko Hevery
2011-01-07change to keydown from keyup; add delayed $updateViewMisko Hevery
- There was a perceived lag when typing do to the fact that we were listening on the keyup event instead of keydown. The issue with keydown is that we can not read the value of the input field. To solve this we schedule a defer call and perform the model update then. - To prevent calling $eval on root scope too many times as well as to prevent drowning the browser with too many updates we now call the $eval only after 25ms and any additional requests get ignored. The new update service is called $updateView
2011-01-07$location service should utilize onhashchange events instead of pollingIgor Minar
2011-01-04renaming service property $creation to $eagerIgor Minar
see changelog diff for more info
2011-01-04removing support for 'eager-published' servicesIgor Minar
2011-01-04Remove many eager-publish services, lazy pollingMisko Hevery
- Browser now starts the poller on first call to addPollFn() - Many services ($location, $cookies, $router) are no longer eager-publish. The result is that unless someone needs the $cookies, they will not cause the Browser to start polling for them.
2010-12-22fromJson delegation to native JSON parser if availableIgor Minar
- native parser delegation - $xhr change to use native parser
2010-12-10$defer service should always call $eval after callback finishedIgor Minar
Closes #189
2010-12-07improving $resource docsIgor Minar
2010-12-06add $browser.defer and $defer service and fix async xhr cache issueIgor Minar
- Closes #152 ($resource().query() sometimes calls callback before returning, and it shouldn't) - add $browser.defer method - add $defer service - integrate $browser.defer with outstandingRequests counter in $browser - fix all old tests that relied on buggy behavior
2010-11-25more docs for angular.service.Igor Minar
2010-11-25Doc service: added example into service overviewVojta Jina
2010-11-18don't escape $ in hashpath eitherIgor Minar
2010-11-18don't escape ! and : in hashPathIgor Minar
This is a temporary fix for Issue #158
2010-11-18fix all closure compilation warnings due to invalid function typesIgor Minar
2010-11-18add @workInProgress tag and mark all @ngdocs as work in progressIgor Minar
2010-11-18make @param type and description non-optionalIgor Minar
2010-11-18make @returns type non-optionalIgor Minar
2010-11-16Changed error handling so that better stack traces are displayed in the ↵Misko Hevery
ng-errors
2010-11-15Added basic Services, which support @memberOf and @methodOfVojta Jina
2010-10-31Small refactor in $location serviceVojta Jina
Added new inner method updateLastLocation()
2010-10-31Fixing issue #98 (infinite loop when location hash set empty)Vojta Jina
Added tests and fixed the issue. Closes #98
2010-10-23$cookieStore should not be a global serviceIgor Minar
you must use $inject to $inject it as any other non-global service
2010-10-19Added tests for URL_MATCH and fixed issue with empty pathVojta Jina
This commit was produced by a combination of 4 commits: - Added URL_MATCH test for basic url - Moved two tests from $location to URL_MATCH, as they should be here - Added test for host without "/" ending and fix the regexp to pass the test - Added another test for matching empty abs path ("/") and fix the regexp
2010-10-18small fixes to the $location servicesIgor Minar
* fixing the jsdoc format * rewriting updateHash() method to be easier to read and so that it minifies better
2010-10-18Removed $location.cancel() method (and related test)Vojta Jina
2010-10-18Update $location API Close #62Vojta Jina
update(objOrString) updateHash(objOrString [, objOrString]) toString() cancel() Examples: $location.update('http://www.angularjs.org/path#path?a=b'); $location.update({port: 443, protocol: 'https'}); $location.updateHash('hashPath'); $location.updateHash({a: 'b'}); $location.updateHash('hashPath', {a: 'b'}); This commit was produced by squash of more commits, here are the old messages: - Change tests to use update() instead of parse(). - First implementation of update() method - Test for update() with object parameter - Add new tests for location, refactor location code - Add tests for updateHash() - Implement updateHash() - Take one or two arguments, could be string - update hashPath, or hash object - update hashSearch... - Fixed other service tests, to use new $location.update() Added $location.cancel() method (with test) Added $location.parse() for back compatability Remove parse() method
2010-10-18Update $location API Close #62Vojta Jina
update(objOrString) updateHash(objOrString [, objOrString]) toString() cancel() Examples: $location.update('http://www.angularjs.org/path#path?a=b'); $location.update({port: 443, protocol: 'https'}); $location.updateHash('hashPath'); $location.updateHash({a: 'b'}); $location.updateHash('hashPath', {a: 'b'}); This commit was produced by squash of more commits, here are the old messages: - Change tests to use update() instead of parse(). - First implementation of update() method - Test for update() with object parameter - Add new tests for location, refactor location code - Add tests for updateHash() - Implement updateHash() - Take one or two arguments, could be string - update hashPath, or hash object - update hashSearch... - Fixed other service tests, to use new $location.update() Added $location.cancel() method (with test) Added $location.parse() for back compatability Remove parse() method
2010-10-14publish $route since we bind it with $route.current in ng:includeMisko Hevery
2010-10-12Introduced injector and $new to scope, and injection into link methods and ↵Misko Hevery
controllers - added angular.injector(scope, services, instanceCache) which returns inject - inject method can return, instance, or call function which have $inject property - initialize services with $creation=[eager|eager-publish] this means that only some of the services are now globally accessible - upgraded $become on scope to use injector hence respect the $inject property for injection - $become should not be run multiple times and will most likely be removed in future version - added $new on scope to create a child scope - $inject is respected on constructor function - simplified scopes so that they no longer have separate __proto__ for parent, api, behavior and instance this should speed up execution since scope will now create one __proto__ chain per scope (not three). BACKWARD COMPATIBILITY WARNING: - services now need to have $inject instead of inject property for proper injection this breaks backward compatibility - not all services are now published into root scope (only: $location, $cookie, $window) - if you have widget/directive which uses services on scope (such as this.$xhr), you will now have to inject that service in (as it is not published on the root scope anymore)
2010-10-12fixing missing semicolonIgor Minar
2010-10-13fix memory leak caused by leftbehind $invalidWidgets referencesIgor Minar
- ng:switch should not clean up $invalidWidgets - $invalidWidgets should be clean up after each eval - add missing docs
2010-10-13temparary backaward compatibility patch for Controller.initIgor Minar
- feedback relies on *Controller.init to be called when a Controller is being created. this with previous angular refactoring this is not happening in angular any more. To make it easier for feedback to transition, this change makes $become call controller's init method if present. - call to Controller.init from $route.updateRoute was removed. this was left there by accident during the previous refactoring.
2010-09-27Reworked the cookie synchronization between cookie service, $browser and ↵Igor Minar
document.cookie. Now we finally correctly handle situations when browser refuses to set a cookie, due to storage quota or other (file:// protocol) limitations.
2010-09-26Properly initialize cookie service in order to preserve existing cookiesIgor Minar
- previously the poller initialized the cookie cache too late which was causing previously existing cookies to be deleted by cookie service - refactored the poller api so that the addPollFn returns the added fn - fixed older cookie service tests - removed "this.$onEval(PRIORITY_LAST, update);" because it is not needed
2010-09-23$cookies service refactoringIgor Minar
- remove obsolete code in tests - add warning logs when maximum cookie limits (as specified via RFC 2965) were reached - non-string values will now get dropped - after each update $cookies hash will reflect the actual state of browser cookies this means that if browser drops some cookies due to cookie overflow, $cookies will reflect that - $sessionStore got renamed to $cookieStore to avoid name conflicts with html5's sessionStore
2010-09-23Rewrite session store service in object literal style and remove getAll ↵Igor Minar
method that is not used anywhere
2010-09-22Refactored the Browser:Misko Hevery
- change from using prototype to inner functions to help with better compression - removed watchers (url/cookie) and introduced a poller concept - moved the checking of URL and cookie into services which register with poolers Benefits: - Smaller minified file - can call $browser.poll() from tests to simulate polling - single place where setTimeout needs to be tested - More testable $browser
2010-09-16removed unneeded commentMisko Hevery
2010-09-14Fixed all trivial jslint violationsMisko Hevery
2010-09-14Adding cookie serviceMisko Hevery
- Browser.cookies() - MockBrowser - $cookie service - $sessionStore
2010-08-18stringify names for better compression, remove dead functions, removed ↵Misko Hevery
underscore.js compatibility
2010-08-11clean up for better obfuscationMisko Hevery
2010-08-10added additional testMisko Hevery
2010-07-30minor speed improvements or URL parsingMisko Hevery
2010-07-30fix up the $location encodingMisko Hevery
2010-07-29refactored $location service so that it correctly updates under all conditionsMisko Hevery
2010-07-26add $exceptionHandler serviceMisko Hevery