Commit graph

371 commits

Author SHA1 Message Date
Vojta Jina
aab3df7aea Fixed filter.date, so it parses format ending with non-replaced string
Closes #159
2011-01-10 10:37:37 -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
Igor Minar
0ad39dde4f fix onhashchange tests for IE 2011-01-10 10:24:12 -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
Igor Minar
b28dee7fd5 use toMatch in widgetSpec 2011-01-07 12:02:46 -08:00
Igor Minar
142a985f33 Revert "Issue #51: Update extensionMap()"
This reverts commit 00ca67e4be.

Now that we don't have published services, we don't need to worryi
about this any more and in fact this behavior is confusing because
to override a service that has dependencies with a services with
no dependencies one must specify $inject:[] or else the old
dependencies will be injected.

Conflicts:

	src/Angular.js
	test/AngularSpec.js
2011-01-07 12:02:45 -08:00
Misko Hevery
807d8c92b3 removed dissabled tests which are now outdated 2011-01-06 14:51:44 -08:00
Misko Hevery
454626ad39 converted last of tests to specs 2011-01-06 14:34:21 -08:00
Igor Minar
b2631f6170 rename scope.$inject to scope.$service
see changelog diff for more info
2011-01-04 18:04:00 -08:00
Igor Minar
1430c6d6b1 renaming service property $creation to $eager
see changelog diff for more info
2011-01-04 18:03:55 -08:00
Igor Minar
3ea5941f0e removing support for 'eager-published' services 2011-01-04 16:40: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
5a534235b6 fixing invalid json strings in ResourceSpec 2010-12-23 09:03:34 -08:00
Igor Minar
e7a0fb250f fromJson delegation to native JSON parser if available
- native parser delegation
- $xhr change to use native parser
2010-12-22 14:16:36 -08:00
Igor Minar
d11088eb43 Revert "Refactor lexer to use regular expressions"
We came across a major performance regression due to this change.
I'm reverting it until we find a better solution.

This reverts commit 23fc73081f.
2010-12-22 14:16:36 -08:00
Misko Hevery
a5df1fc41f Stricter JSON parsing, for security 2010-12-11 10:07:10 -08:00
Misko Hevery
ec4d446f89 Closes #153: input widgets without name are ignored 2010-12-11 08:28:11 -08:00
Misko Hevery
b225083a21 Fire $eval only if the value has actually changed on input 2010-12-11 08:27:52 -08:00
Igor Minar
b370fac4fc $defer service should always call $eval after callback finished
Closes #189
2010-12-10 13:22:44 -08:00
Misko Hevery
23fc73081f Refactor lexer to use regular expressions 2010-12-08 14:39:22 -08:00
Misko Hevery
e5e69d9b90 Remove RegExp parser
- RegExp parser is rearly used, feature, and one should not have RegExps
  in views anyways, so we are removing it

BACKWARD INCOMPATIBLE CHANGE!!!
2010-12-08 14:36:51 -08:00
Misko Hevery
fa722447f8 Fixed failed assignments of form abj[0].name=value
Closes #169
2010-12-08 14:20:26 -08:00
Igor Minar
c8f34e7f6b fixing lint warnings in older code 2010-12-06 16:45:59 -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
Misko Hevery
2bbced212e Fix sanitization issues as suggested by evn 2010-12-03 15:42:42 -08:00
Misko Hevery
5a8ad8fe32 Closes #170. Corrected the behavior of select when options are ng:repeated
- Delete $postEval method, as it was a hack
2010-12-02 22:45:57 -08:00
Misko Hevery
41d5938883 Fixed sanitization
* explicitly require full URLs (ftp|https?://...)
* list the URI attributes
* remove a lot of unneeded attributes
2010-11-29 21:55:32 -08:00
Igor Minar
efec0c358d Add angular.Array.limitTo and docs for angular.Array 2010-11-22 10:57:32 -08:00
Igor Minar
522ec1a9ec move attribute widgets to widgets.js file
- move @ng:repeat to widgets.js and its specs to widgetsSpecs.js
- move @ng:non-bindable to widgets.js and its specs to widgetsSpecs.js
- make widget.template suitable for attribute widgets
- fix up the js docs for attribute widgets
2010-11-18 02:35:29 -08:00
Misko Hevery
b2d63ac48b Changed error handling so that better stack traces are displayed in the ng-errors 2010-11-16 14:19:55 -08:00
Igor Minar
a130bb899d add onload attribute to ng:include 2010-11-16 11:35:43 -08:00
Igor Minar
0a8b3161b1 $watch should optionally skip listener exec
- if initRun param is set to false, listener doesn't execute
- the oldValue should equal newValue during the initial execution
- added docs
- added specs
2010-11-11 16:39:01 -08:00
Igor Minar
c5b2bf083c Make ng:repeat expose $position.
- $position is a textual representation of the position of
  repeated item ('first', 'middle', 'last')
- added specs for $index
2010-11-10 21:04:44 -08:00
Misko Hevery
0499c47270 added ng:switch-when-default; changed $watch to always fire on init. (may be backward incompatible) 2010-11-10 21:01:17 -08:00
Igor Minar
264f960800 added spec for auto bootstrap with #autobind 2010-11-09 19:58:42 -08:00
Elliott Sprehn
257e97a65f Support substring matching of bindings with repeater(). Closes #123 2010-11-09 13:39:12 -08:00
Elliott Sprehn
96e37a0866 Add key/value jQuery methods in a loop. Support 'css' method.
Closes #134
2010-11-09 08:02:49 -08:00
Vojta Jina
5062d32621 Updated parser tests to use jasmine expects
And some formatting as well and a bit of rafactor...
2010-11-09 07:38:03 -08:00
Vojta Jina
d458f31711 Updated filters tests to use jasmine expects
And some small formatting...
2010-11-09 07:38:03 -08:00
Igor Minar
fc9ce9ec07 make angular.String.toDate consider all time fractions as optional 2010-11-08 22:49:30 -08:00
Igor Minar
e5c135ac50 Support ISO 8601 extended datetime format troughout angular.
Support ISO 8601 extended format datetime strings (YYYY-MM-DDTHH:mm:ss.SSSZ) as defined
  in EcmaScript 5 throughout angular. This means that the following apis switched from
  YYYY-MM-DDTHH:mm:ssZ to YYYY-MM-DDTHH:mm:ss.SSSZ (note the added millis) when representing dates:
  - angular.Date.toString
  - angular.String.toDate
  - JSON serialization and deserialization (used by json filter, $xhr and $resource)
2010-11-08 22:49:30 -08:00
Igor Minar
1a43f36e23 Add isDate method + fix old code 2010-11-08 22:49:29 -08:00
Igor Minar
1c305dc67a fixing spec description for the date filter 2010-11-08 22:46:41 -08:00
Igor Minar
a397645537 date filter should accept ISO 8601 formatted string as input
Closes #125
2010-11-08 22:46:41 -08:00
Igor Minar
f077649f48 TzDate should support various UTC methods 2010-11-08 22:46:41 -08:00
Vojta Jina
f3ac2cd434 Update AngularSpec tests to use BDD style - jasmine expect 2010-11-07 14:42:04 -08:00
Vojta Jina
7779630989 Added tests for angular.service
- should allow to override a service
- should preserve angular properties on override
- should not preserve non-angular properties on override
2010-11-07 14:42:03 -08:00
Vojta Jina
00ca67e4be Issue #51: Update extensionMap()
If user override existing extension, angular properties ($) will be preserved.

This piece of logic could be refactored into separate method:
Something like we have extend(), addMissingProperties() - I can't find a name
for this method...

Closes #51
2010-11-07 14:42:03 -08:00
Misko Hevery
91b6c5f7ff Added documentation for validators.
BACKWARD INCOMPATIBLE: removed ssn validators, since it is unlikely that most people will need it and if they do, they can added it thorough RegExp
2010-11-07 13:06:55 -08:00