Commit graph

1310 commits

Author SHA1 Message Date
Igor Minar
bf79bd4194 fix(ngTransclude): make the transclusion available to parent post-link
previously the translusion was appended the the ngTranslude element via
$evalAsync which makes the transluded dom unavailable to parent
post-linking functions. By appending translusion in linking phase,
post-linking functions will be able to access it.
2013-08-20 23:31:38 -07:00
Matias Niemelä
b1a43cd04e fix($sniffer): ensure older versions of webkit work for animations 2013-08-19 15:51:28 -07:00
Matias Niemelä
6749fef227 revert(ngInclude): remove ngInclude manual transclusion system 2013-08-19 14:55:19 -07:00
Tom Dunstan
3bc4e7fd20 fix(filter): filter on false properties
Code was evaluating !expression[key] while attempting to
see if the key was present, but this was evaluating to true for
false values as well as missing keys.

Closes #2797.
2013-08-15 15:50:34 -07:00
Jussi Kosunen
3a65822023 fix($parse): handle promises returned from parsed function calls
When a parsed function call returns a promise, the evaluated value
is the resolved value of the promise rather than the promise object.

Closes #3503
2013-08-15 15:15:27 -07:00
Ken Sheedlo
37123cd285 feat(minerr): log minerr doc url in development
Closes #3566
2013-08-15 13:23:18 -07:00
Andy Gurden
920a380413 fix($timeout): clean deferreds immediately after callback exec/cancel
Make sure $timeout callbacks are forgotten about immediately after
execution or cancellation.

Previously when passing invokeApply=false, the cleanup used $q and so
would be pending until the next $digest was triggered. This does not
make a large functional difference, but can be very visible when
looking at memory consumption of an app or debugging around the
$$asyncQueue - these callbacks can have a big retaining tree.
2013-08-14 14:34:06 -07:00
Igor Minar
d69cd7d9ca test($location): fix broken tests
sorry, my bad!
2013-08-12 14:43:24 -07:00
Igor Minar
2c64f3dc17 docs(minErr): add location/isrcharg docs 2013-08-12 14:09:09 -07:00
Igor Minar
72dc48ea4d docs(minErr): add location/ihshprfx 2013-08-12 14:09:08 -07:00
Igor Minar
544d2616b4 chore($location): drop bugus error
we can never get to this state, so dropping the error
2013-08-12 14:09:08 -07:00
Igor Minar
d4d34aba6e fix($location): don't initialize hash url unnecessarily
After a recent refactoring using $location in the default hashbang mode would result
in hash url being initialized unnecessarily in cases when the base url didn't end
with a slash.

for example http://localhost:8000/temp.html would get rewritten as
http://location:8000/temp.html#/temp.html by error.
2013-08-12 14:09:08 -07:00
joshrtay
04cebcc133 feat($route): express style route matching
Added new route matching capabilities:
  - optional param
Changed route matching syntax:
 - named wildcard

BREAKING CHANGE: the syntax for named wildcard parameters in routes
    has changed from *wildcard to :wildcard*

    To migrate the code, follow the example below.  Here, *highlight becomes
    :highlight*:

    Before:

    $routeProvider.when('/Book1/:book/Chapter/:chapter/*highlight/edit',
              {controller: noop, templateUrl: 'Chapter.html'});

    After:

    $routeProvider.when('/Book1/:book/Chapter/:chapter/:highlight*/edit',
            {controller: noop, templateUrl: 'Chapter.html'});
2013-08-12 11:04:37 -07:00
Chirayu Krishnappa
c173ca4128 fix($compile): correct controller instantiation for async directives
This fixes regression introduced by #3514 (5c560117) - this commit is being
reverted here and a better fix is included.

The regression caused the controller to be instantiated before the isolate scope
was initialized.

Closes #3493
Closes #3482
Closes #3537
Closes #3540
2013-08-12 10:36:25 -07:00
Matias Niemelä
2430347ece fix(ngAnimate): make sure that the class value passed into addClass/removeClass is the base class string value 2013-08-09 14:39:58 -07:00
Matias Niemelä
f61ff69519 chore(ngAnimate): fix incomplete animation test 2013-08-09 14:39:58 -07:00
Matias Niemelä
1b5bee4fa1 fix(ngInclude): ensure ngInclude is terminal and uses its own manual transclusion system 2013-08-09 14:39:57 -07:00
Ken Sheedlo
45dc9ee7b4 style(minerr): prefer component name as namespace
Closes #3527
2013-08-09 14:12:04 -07:00
Brian Ford
f078762d48 chore($q): rename promise.always to promise.finally
BREAKING CHANGE: the `always` method has been renamed to `finally`.

The reason for this change is to align `$q` with the Q promises library,
despite the fact that this makes it a bit more difficult to
use with non-ES5 browsers, like IE8.

`finally` also goes well together with `catch` api that was added to
$q recently and is part of the DOM promises standard.

To migrate the code follow the example below:

Before:

$http.get('/foo').always(doSomething);

After:

$http.get('/foo').finally(doSomething);

or for IE8 compatible code:

$http.get('/foo')['finally'](doSomething);
2013-08-09 14:08:57 -07:00
Jeff Cross
3ee744cc63 fix(re-bootstrap): Throw an error when bootstrapping a bootstrapped element.
Nothing would prevent a user from accidentally calling angular.bootstrap on an element that had already been bootstrapped. If this was done, odd behavior could manifest in an application, causing different scopes to update the same DOM, and causing debugger confusion.

This fix adds a check inside of angular.bootstrap to check if the passed-in element already has an injector, and if so, will throw an error.
2013-08-09 13:14:12 -07:00
Brian Ford
94ec84e7b9 chore(ngMobile): rename module ngTouch and file to angular-touch.js
BREAKING CHANGE: since all the code in the ngMobile module is touch related,
we are renaming the module to ngTouch.

To migrate, please replace all references to "ngMobile" with "ngTouch" and
"angular-mobile.js" to "angular-touch.js".

Closes #3526
2013-08-09 11:54:35 -07:00
Jeff Cross
0b114fd3e1 fix(docs-bootstrap): Removed injector from bootstrapped docs samples
This is necessary to make e2e tests pass for implementing #3411. At present, the docs are violating the rule being enforced by double-bootstrap prevention.
2013-08-09 10:19:41 -07:00
bolasblack
a207665dad feat($q): add shorthand for defining promise error handlers
Now we can instead this

    promise.then(null, errorHandler)

with this

    promise.catch(errorhandler)

Closes #2048
Closes #3476
2013-08-09 09:02:58 -07:00
Igor Minar
b3087421f2 docs(jqLite): update the minErr codes for on() and off() 2013-08-09 00:39:31 -07:00
Andy Hitchman
f80730f497 fix(angular.copy): change angular.copy to correcly clone RegExp
angular.copy previously copied RegExp as an empty object. Change detects
RegExp instance and clones into new RegExp. This change is based on a previous
fix to allow Date to be copied.

Closes #3473
Closes #3474
2013-08-08 23:29:59 -07:00
Ken Sheedlo
4f5dfbc362 fix(jqLite): throw when jqLite#off called with 4 args
Closes #3501
2013-08-08 22:40:04 -07:00
jankuca
5c56011742 fix($compile): always instantiate controllers before pre-link fns run
Controllers should be always instantiated after compile fn runs, but before
pre-link fn runs. This way, controllers are available to pre-link fns that
request them.

Previously this was broken for async directives (directives with templateUrl).

Closes #3493
Closes #3482
Closes #3514
2013-08-08 21:53:44 -07:00
Misko Hevery
dbd703a9fb docs(compile/selmulti): description for compile/selmulti error
Closes #3459
2013-08-08 17:16:46 -07:00
Misko Hevery
78a445fa37 docs(compile/notassign): description for compile/notassign error
Closes #3459
2013-08-08 14:33:16 -07:00
Igor Minar
e27fb4ddd6 docs(minErr): rename compile/utrat to compile/uterdir 2013-08-08 11:02:30 -07:00
Igor Minar
0bf0570505 docs(minErr): rename sce/isecrurl to sce/insecurl 2013-08-08 10:22:32 -07:00
Ken Sheedlo
e4b6a1eaa4 docs(minerr): fill in error message descriptions
Errors I've documented so far:
- `$injector:cdep`
- `$injector:itkn`
- `$injector:modulerr`
- `$injector:nomod`
- `$injector:pget`
- `$injector:unpr`
- `ng:areq`
- `ng:cpi`
- `ng:cpws`
- `ngModel:noass`

Closes #3430
2013-08-07 21:36:59 -07:00
Eric Hagman
306a613440 fix(jqLite): return array from multi select in val() 2013-08-07 21:33:37 -07:00
Chirayu Krishnappa
4be7612079 test(matchers): support 'not' text in toBeHidden matcher 2013-08-07 16:35:37 -07:00
Matthew Windwer
8ea802a1d2 feat(ngForm): Supports expression in form names
<form name="ctrl.form"> form controller will accessible
as $scope.ctrl.form instead of $scope['ctrl.form']

BREAKING CHANGE:
If you have form names that will evaluate as an expression:

<form name="ctrl.form">

And if you are accessing the form from your controller:

  Before:

  function($scope) {
    $scope['ctrl.form'] // form controller instance
  }

  After:

  function($scope) {
    $scope.ctrl.form // form controller instance
  }

This makes it possible to access a form from a controller
using the new "controller as" syntax. Supporting the previous
behavior offers no benefit.
2013-08-07 13:50:18 -07:00
Igor Minar
d1cdd4d026 chore(dump): fix our karma.dump bridge
previously it didn't work for dumping multiple objects
2013-08-07 11:21:34 -07:00
neilmcgibbon
af731354b0 fix(input): fix the email regex to accept TLDs up to 6 characters long
The input field email regex does't not match long domain extensions. This commit extends the email regexp to take a 6 character TLD.

Example 6-character TLDs include .museum and .travel - (e.g. allabout.travel).
2013-08-07 14:02:44 -04:00
Pawel Kozlowski
ab59cc6c44 fix(jqLite): forgive unregistration of a non-registered handler 2013-08-07 18:52:47 +02:00
Ken Chen
08daa7797b feat(ngMock/$httpBackend): support a matching function for data param
Add support for passing function as validating data:
 - To avoid hacking test method of RegExp
 - Optionally overwrite `toString` method of fn to show validation tips
 - change docs: param description for `when`, `whenPost`, `whenPut`,
   `expect`, `expectPost`, `expectPut`, `expectPATCH`

Closes: #2981
2013-08-06 16:54:50 +01:00
Matias Niemelä
f2dfa8916f feat($compile): support compile animation hooks classes 2013-08-03 00:46:18 -07:00
Matias Niemelä
6e8bd786ba fix(ngAnimate): remove compound JS selector animations 2013-08-03 00:46:17 -07:00
Matias Niemelä
85d705ab69 chore(ngMock): rename $animate.process to $animate.flushNext() 2013-08-02 23:52:37 -07:00
Étienne Barrié
3079a6f4e0 fix(ngMock): keep withCredentials on passThrough
When using passThrough() and specifying withCredentials on the $http
call, the option is now passed to the underlying $httpBackend.
2013-08-01 16:07:33 -07:00
Misko Hevery
705c9d95bc fix(location): fix parameter handling on search() 2013-07-31 16:55:06 -07:00
James Davies
61906d3517 fix($parse): unwrap promise when setting a field
This fixes an inconsistency where you can't call the setter function
when the expression resolves to a top level field name on a promise.

Setting a field on an unresolved promise will throw an exception.  (This
shouldn't really happen in your template/js code and points to a
programming error.)

Closes #1827
2013-07-31 16:22:24 -07:00
Jan Laußmann
0bbd20f255 fix(mobile-ng-click): prevent unwanted opening of the soft keyboard
Ghost clicks are busted but the corresponding form elements are still focused. This means that for example on smartphones the soft keyboard will be opened. This pull request prevents the unwanted opening of the soft keyboard.
2013-07-31 16:08:00 -07:00
Andreas Marek
3fdbe81a33 feat(scenario): expose jQuery for usage outside of angular scenario
The global jQuery reference is removed by angular scenario and only a local scoped reference is kept. To make jQuery available for other code, a new reference angular.scenario.jQuery is added.
2013-07-31 15:50:12 -07:00
Andy Joslin
bdd4e982b7 fix(jqLite): support space-seperated events in off
Closes #3256
2013-07-31 14:23:35 -07:00
Chirayu Krishnappa
f274c0a66b fix(mock.$log): keep in sync with $log
Closes #2343
2013-07-31 13:38:24 -07:00
Pete Bacon Darwin
664526d69c fix($q): call reject() even if $exceptionHandler rethrows
Normally $exceptionHandler doesn't throw an exception.  It is normally
used just for logging and so on.  But if an application developer
implemented a version that did throw an exception then $q would never
have called reject() when converting an exception thrown inside a `then`
handler into a rejected promise.
2013-07-31 21:17:38 +01:00