Commit graph

2729 commits

Author SHA1 Message Date
Igor Minar
166e0d63d0 revert: fix($compile): correct controller instantiation...
fix($compile): correct controller for async directives

This reverts commit 51d32243fe
as well as commit   9c51d50318

Changing ordering of events in stable branch is not a good idea.
2013-08-21 01:27:58 -07:00
Igor Minar
0d7f19bb62 revert: fix($compile): always instantiate controllers...
fix($compile): always instantiate controllers in parent->child order

This reverts commit 683fd713c4.

It turns out that there is some existing code that relies on the
incorrect timing. Rather than breaking these apps that depend on
stable releases, we are going to keep this changeo only in master
and the apps will need to migrate to the correc timing during the
1.2 upgrade.
2013-08-21 01:21:02 -07:00
Michał Gołębiowski
607045d592 fix(package.json): add a repository field
The `npm install` command complains about the missing repository field.

Closes #3674
2013-08-20 23:56:38 -07:00
Chirayu Krishnappa
51d32243fe fix($compile): correct controller instantiation for async directives
This fixes regression introduced by #3514 (9c51d503) - 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-20 18:51:07 -07:00
Reto Aebersold
1c1a1bc9ed style(docs): replace CRLF by LF in svg header logo 2013-08-16 20:06:35 -07:00
Brian Ford
553fdb318f fix(grunt): fix regex in grunt util to handle pre-release versions
NOTE: this also includes a temporary work-around for Bower
2013-08-15 12:43:05 -07:00
Rob Dodson
607ed4ee46 docs($cookies): add info about angular-cookies.js
per the [top comment here](http://docs.angularjs.org/api/ngCookies.$cookies#comment-912064775)

updating documentation so it matches [$resource](http://docs.angularjs.org/api/ngResource.$resource)
and instructs the user to include the `angular-cookies.js` and load `ngCookies`.

Closes #3607
2013-08-15 10:25:00 -07:00
ItsLeeOwen
ec1cece270 fix(orderBy): remove redundant if statement
Removed unnecessary additional conditional statement.
2013-08-14 17:01:58 -07:00
Vojta Jina
4656e386fb chore: fix Travis build
Specify hostname/port for connect server to avoid
https://github.com/joyent/libuv/issues/826

Conflicts:
	Gruntfile.js
2013-08-14 16:12:37 -07:00
Vojta Jina
f29f2f99b1 chore: disable npm install on Travis
Grunt is configured to run `npm install` before every task. That is convenient when switching a branch for example.

On Travis, this makes no sense and is causing tons of NPM warnings (eg. packages not defining repository field etc).
2013-08-14 16:12:37 -07:00
Vojta Jina
cc27f08588 chore: update Node.js on Travis 2013-08-14 16:12:37 -07:00
Vojta Jina
99fe398b59 chore: update Karma to v0.10 2013-08-14 16:12:36 -07:00
Vojta Jina
cb89e02432 chore(sauce): use tunnel-identifier and ready-file only on Travis
When running locally, there's not TRAVIS_JOB_NUMBER env variable defined and it screws
the Sauce Connect (it uses a tunnel with empty name), this makes it work locally without defining
TRAVIS_JOB_NUMBER env variable.

Also, if you run the sauce_connect_setup.sh locally, without having SAUCE_CONNECT_READY_FILE, it
does not pass the `--ready-file` argument to avoid Sauce Connect blowing up.
2013-08-14 16:12:36 -07:00
Andy Gurden
ac69392cd7 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 16:04:48 -07:00
Vojta Jina
a5fb372e1e fix(mocks.$timeout): forward delay argument
The $timeout decorator was not forwarding the delay argument to `browser.defer.flush(delay)`.
2013-08-14 16:04:48 -07:00
ebeal
da720712f3 fix(tutorial): fix broken link caused by bad line break 2013-08-14 15:46:48 -07:00
Mikk Kirstein
0cb3dc8782 docs($http): added return to interceptors success callback 2013-08-14 14:19:10 -07:00
Igor Minar
dfd95f0115 revert: docs($interpolate): add example for the provider
This reverts commit 1a01e80b9c.

This example is bogus, breaks docs.angularjs.org and karma e2e tests
2013-08-14 14:08:18 -07:00
David Bennett
7636670a77 docs(input): add missing ngChange directive for email type
All other input types already have it.
2013-08-13 10:17:44 -07:00
Siddique Hameed
fe6247a7f8 docs(guide/unit-testing): add expression example
* Improved developer guide, directive unit testing documentation code with scope expression
* Removed documentation block with nothing on it
2013-08-12 16:23:39 -07:00
Vojta Jina
2b90ef1694 test(matchers): update toThrow matcher 2013-08-12 16:23:39 -07:00
Chirayu Krishnappa
099138fb9a fix($parse): move global getter out of parse.js 2013-08-12 16:23:39 -07:00
Igor Minar
cbe31d8dfd fix($location): default to / for the url base if no base[href]
With the recent refactoring of $location service we changed this behavior
resulting in a regression.

Previously we thought that html5 mode always required base[href]
to be set in order for urls to resolve properly. It turns out that
base[href] is problematic because it makes anchor urls (#foo) to
always resolve to the base url, which is almost always incorrect
and results in all anchors links and other anchor urls (e.g. svg
references) to be broken.

For this reason, we should now start recommending that people just
deploy to root context (/) and not set the base[href] when using
the html5 mode (push/pop history state).

If it's impossible to deploy to the root context then either all
urls in the app must be absolute or base[href] must be set with the
caveat that anchor urls in such app won't work.

Closes #2762
2013-08-12 16:23:38 -07:00
Vineet Kumar
06b0930b6a fix(ngCloak): hide element even when CSS 'display' is set
Previously an element like
<div class="foo ng-cloak">...</div>
would still be annoyingly visible if it matched a CSS rule like
.foo { display: inline-block; }, overriding ng-cloak's display: none.
2013-08-12 16:23:38 -07:00
Sebastian Müller
7b7be341b6 refactor(core): use native String.prototype.trim if available 2013-08-12 16:23:38 -07:00
Lucas Galfasó
751c77f87b fix(i18n): Do not transform arrays into objects
Do not trasnform arrays into objects when generating the locale objects
Add unit test for this check
2013-08-12 16:23:38 -07:00
Ben Holley
634ac03c5e style(sanitize): fix typo in variable names 2013-08-12 16:23:38 -07:00
Vojta Jina
8cab53c64d chore(package.json): fix name to work with latest NPM 2013-08-12 16:23:38 -07:00
Igor Minar
edef295b11 fix(grunt): cache version number
caching the version number speeds up the build and preserves resources.

this also fixed EMFILE error that now occurs on some macs.
2013-08-12 16:23:38 -07:00
Jeff Cross
64e447354e fix(dump): Prevented window.dump from being overridden by karma-jasmine.
In commit 6820322db562382fac903be35831275948825317 of Karma-Jasmine, the
dependency on angular.dump was removed. This caused two undesirable side
effects in the angular.js project. 1) Tests for presence of mock dump were failing,
and 2) the default window.dump was not outputting valuable angular-aware info. This
simple fix adds window.dump in testabilityPatch, to preprocess dumped input prior
to passing it to the global dump method.
2013-08-12 16:23:38 -07:00
Brenton
da1f7c762d fix(equals): {} and [] should not be considered equivalent
angular.equals was returning inconsistent values for the comparison between
{} and []:

    angular.equals({}, []) // true
    angular.equals([], {}]) // false

Since these object are not of the same type, they should not be considered
equivalent.
2013-08-12 16:23:38 -07:00
Roland
89366bdbf9 docs(guide): remove superfluous }); 2013-08-12 16:23:37 -07:00
Igor Minar
78efa0e36c fix($compile): don't check attr.specified on non-ie7
the specified attribute is depricated and creates warnings in Firefox

Closes #3231
Closes #2160
2013-08-12 16:23:37 -07:00
Matias Niemelä
3a8b3db174 chore(.gitignore): ignore npm-debug.log file 2013-08-12 16:23:37 -07:00
Emmanuel
1a01e80b9c docs($interpolate): add example for the provider 2013-08-12 16:23:37 -07:00
Pete Bacon Darwin
d59027c40e 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-08-12 16:23:37 -07:00
jankuca
c197c2aa27 chore(bower): add a .bowerrc file 2013-08-12 16:23:37 -07:00
Eric Hagman
01cd34957e fix(jqLite): return array from multi select in val() 2013-08-12 12:00:47 -07:00
OpherV
864517e5a2 docs($compile): update directive type signature
To avoid "Argument type Array is not assignable to parameter type function" validation error  When using the minifcation-safe array style

(eg .directive('myDirective', ['$http','$timeout','$compile', function($http,$timeout $compile).... )

Closes #3392
2013-08-09 10:34:26 -07:00
Niall Smart
1dd5d2ec1f docs(ngModel): validators should return undefined for invalid values.
Closes #3525
2013-08-09 10:24:48 -07:00
Santi Albo
6da835f4bc docs(httpBackend): update documentation for expect methods
`expect` methods can receive an Object as the data parameter, which was
undocumented.
2013-08-09 10:10:45 -07:00
Andy Hitchman
5cca077e4a 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-09 00:17:34 -07:00
Igor Minar
e290aa8c13 docs(ngModel): clarify docs for NgModelController#
Closes #3498
2013-08-08 23:08:08 -07:00
jankuca
9c51d50318 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 22:58:51 -07:00
Matias Niemelä
1c3a46adda chore(ngdoc): wrap all pages inside of a container tag for easy styling 2013-08-07 22:11:45 +01:00
Matthew Windwer
4407e81c61 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:59:41 -07:00
neilmcgibbon
ad76e77fce 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:18:22 -04:00
Pawel Kozlowski
ac5b9055f6 fix(jqLite): forgive unregistration of a non-registered handler 2013-08-07 19:09:04 +02:00
Michael Stewart
c18074a310 docs(compile): fix minor spelling mistake
Closes: #3468
2013-08-06 16:31:11 +01:00
Mark Campbell
ed703d8e2c docs(guide/controller): fix wording in list of 'Do not use'
Wording has been changed in two of the examples to read naturally.
For example:

From: 'Do not use controllers for to run stateless or stateful code
shared across controllers'

To: 'Do not use controllers for sharing stateless or stateful code
across controllers'

Closes #3454
2013-08-03 22:06:03 +01:00