Commit graph

39 commits

Author SHA1 Message Date
Misko Hevery
d35c1ac8b0 Fixed notifyWhenNoOutstandingRequests() when using JSONP 2011-02-03 20:03:32 -08:00
Igor Minar
9462c78fbf $browser poller should notify $location only once per url change 2011-02-01 09:35:18 -08:00
Misko Hevery
c2f2587a79 fixed example rendering, add tests for it. 2011-01-24 14:23:51 -08:00
Igor Minar
23875cb330 significant rewrite of the $location service
- don't update browser before and after eval instead
  - sync location properties before eval
  - sync location properties and update browser after eval
- added tests
- symplified the code
- removed $location.toString() because it was not idempotent and useless

This resolves the issue with issuing two $route.onHashChange calls
when the $location was updated with a hashPath that needs to be encoded
2011-01-13 16:58:35 -08:00
Igor Minar
0a6cf70deb Rename angular.foreach to angular.forEach to make the api consistent.
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-10 10:26:55 -08:00
Misko Hevery
47c454a315 change to keydown from keyup; add delayed $updateView
- 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 14:39:46 -08:00
Igor Minar
16086aa37c $location service should utilize onhashchange events instead of polling 2011-01-07 14:39:41 -08:00
Misko Hevery
d0270d9256 Remove many eager-publish services, lazy polling
- 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.
2011-01-04 16:40:40 -08:00
Igor Minar
011fa39c2a add $browser.defer and $defer service and fix async xhr cache issue
- 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-12-06 16:45:59 -08:00
Igor Minar
1719b0aca5 fix all closure compilation warnings due to invalid function types 2010-11-18 17:03:43 -08:00
Igor Minar
fc7f11d03b add @workInProgress tag and mark all @ngdocs as work in progress 2010-11-18 16:28:42 -08:00
Igor Minar
a6978b201b make @param type and description non-optional 2010-11-18 02:35:28 -08:00
Vojta Jina
cc749760fd Added basic Services, which support @memberOf and @methodOf 2010-11-15 21:55:37 -08:00
Misko Hevery
286d1fe434 fix issue where script calls back before callback registered. 2010-10-19 21:03:34 -07:00
Igor Minar
7059579c74 inline all images into css
* embedded images as data URIs
* rake task to generate multipart js file with embeded images for IE
* move images into a separate directory outside of src or css and
  keep them there for reference
* clean up Rakefile and ruby code
* .gitignore update
* don't penalize IE 8+ with an extra request to the ie-compat.js file
2010-10-18 16:24:43 -07:00
Igor Minar
984acdc627 Reworked the cookie synchronization between cookie service, $browser and 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-27 15:10:05 -07:00
Igor Minar
3eec8c1a51 Properly initialize cookie service in order to preserve existing cookies
- 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-26 23:54:31 -07:00
Igor Minar
acbcfbaf30 $cookies service refactoring
- 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-23 17:23:52 +08:00
Misko Hevery
0649009624 Refactored the Browser:
- 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-22 16:17:44 +02:00
Misko Hevery
e3f760fbad Adding cookie service
- Browser.cookies()
  - MockBrowser
  - $cookie service
  - $sessionStore
2010-09-14 22:51:01 +02:00
Misko Hevery
5ddd8d9586 stringify names for better compression, remove dead functions, removed underscore.js compatibility 2010-08-18 17:26:33 -07:00
Misko Hevery
89245f3a52 added RequestHeaders to XHR 2010-08-03 16:53:27 -07:00
Misko Hevery
1a730a9996 fixed some of the IE bugs 2010-07-23 11:46:04 -07:00
Misko Hevery
748e91ba92 fixed some of the IE bugs 2010-07-23 11:38:52 -07:00
Misko Hevery
2987f7f705 fix howers which were accidently broken 2010-07-22 15:32:57 -07:00
Misko Hevery
849a05b5a5 added jsonp to resources 2010-07-22 11:18:32 -07:00
Misko Hevery
c7d64f6d12 improve error handling with elements 2010-05-30 16:34:59 -07:00
Andres Ornelas
aedf12f25e added outstanding request queue 2010-05-26 15:21:58 -07:00
Andres Ornelas
0d41c86522 fixed broken jstd conf file 2010-05-26 15:17:28 -07:00
Misko Hevery
038a743e6f xhr bulk fixes 2010-05-07 12:09:14 -07:00
Misko Hevery
ac1d02d065 make xhr post optional 2010-04-30 12:22:07 -07:00
Misko Hevery
c7913a4b7a added $xhr service with bulk and cache, hooked up $resource 2010-04-29 17:28:33 -07:00
Misko Hevery
8b29156a2d ie6 now passes 2010-04-21 14:29:05 -07:00
Misko Hevery
22d93e0a3b fixes to enable ie 2010-04-20 18:14:13 -07:00
Misko Hevery
deb86fe357 lots of small fixes 2010-04-16 14:01:29 -07:00
Misko Hevery
2107eafcde added hover service 2010-04-05 20:53:33 -07:00
Misko Hevery
7a4b480206 added ng:switch widget 2010-04-05 11:46:53 -07:00
Misko Hevery
5dcf9bb4fe browser is now injectable into the system 2010-04-03 20:23:16 -07:00
Misko Hevery
a80a61839a injection is now working 2010-04-03 17:04:36 -07:00