Commit graph

1637 commits

Author SHA1 Message Date
Misko Hevery
80341cb9ba feat(injector): add has method for querying
Closes #2556
2013-05-02 15:22:16 -04:00
Misko Hevery
9956baedd7 fix(ngView): accidentally compiling leaving content
closes: #2304
2013-05-02 15:22:16 -04:00
Gonzalo Ruiz de Villa
1d8e11ddfb fix(ngRepeat): correctly iterate over array-like objects
Check if the object is array-like to iterate over it like it's done with arrays.

Closes #2546
2013-05-02 15:12:37 +01:00
Gonzalo Ruiz de Villa
6452707d40 fix($rootScope) ensure $watchCollection correctly handles arrayLike objects 2013-05-02 15:12:37 +01:00
quazzie
dc9a580617 fix($location): back-button should fire $locationChangeStart
Before $locationChangeStart event is not broadcast when pressing the back-button on the browser.

Closes #2109
2013-05-01 14:42:10 +01:00
Siddique Hameed
89c0b5d096 docs(injector): fix typo
Closes: #2551
2013-05-01 13:14:54 +01:00
Braden Shepherdson
52a55ec618 feat(ngTap): Add a CSS class while the element is held down. 2013-04-30 16:56:24 -07:00
Vojta Jina
de2cdb0658 fix(ngController): allow dots in a controller name
The issue was introduced in cd38cbf975
2013-04-30 14:38:14 -07:00
David Bennett
cda7b71146 feat($httpBackend): add timeout support for JSONP requests
Documentation implies that timeout works for all requests, though it
only works with XHR. To implement:
- Change $httpBackend to set a timeout for JSONP requests which will
immediately resolve the request when fired.
- Cancel the timeout when requests are completed.
2013-04-30 20:42:34 +01:00
Robin Böhm
d6984db4d5 style($injector): add a comment to explain the distinction with isArray 2013-04-30 10:39:33 +01:00
Eugene Wolfson
ef7ba7b212 docs($provide): fix parentheses in example 2013-04-30 10:16:24 +01:00
Matias Niemelä
b3a62b2e19 feat(ngdocs): support for HTML table generation from docs code 2013-04-29 17:43:14 -04:00
Misko Hevery
400f9360bb fix(ngController): change controllerAlias to controllerAs. 2013-04-29 14:28:54 -04:00
Lucas Galfasó
7812ae75d5 fix(parse): Fix context access and double function call
Fix a context duplication and invocation to a previous context when
doing an access modifier function on the result of a function
Currently, when doing `foo().bar()`, `foo` is called twice, the first
time to get the context and the second one for `bar` to get the
underlying object. Then the call to `bar` is called using the second
instance as self
This is equivalent to doing:
```
var instance1 = foo();
var instance2 = foo();
instance2.bar.apply(instance1);
```

Closes #2496
2013-04-29 19:16:21 +01:00
gockxml
06f2b2a8cf fix(jqLite): correct implementation of mouseenter/mouseleave event
Implement mouseenter/mouseleave event referring to
http://www.quirksmode.org/js/events_mouse.html#link8 and jQuery source
code(not dependent on jQuery).
The old implementation is wrong. When moving mouse from a parent element
into a child element, it would trigger mouseleave event, which should not.
And the old test about mouseenter/mouseleave is wrong too. It just
triggers mouseover and mouseout events, cannot describe the process of mouse
moving from one element to another element, which is important for
mouseenter/mouseleave.

Closes #2131, #1811
2013-04-29 18:26:32 +01:00
Robin Böhm
cb62a57d43 refact(ngClass): improve performance through bitwise operations
Change modulo % 2 operations to bitwise & 1
Read about this in Nicholas C. Zakas book "High Performance JavaScript"(ISBN: 978-0-596-80279-0)
Use the Fast Parts --> Bitwise Operators --> Page 156++
Proven at http://jsperf.com/modulo-vs-bitwise/11
2013-04-29 10:19:07 +01:00
Jamie R. Rytlewski
61c0adedc3 docs($q): fix typo 2013-04-28 18:44:07 +01:00
Andreas Pelme
32719c7976 docs(route): fix typo in route documentation 2013-04-26 13:16:19 +01:00
Pete Bacon Darwin
77ff108555 fix(location): correctly rewrite Html5 urls 2013-04-25 19:08:41 +01:00
Paulo Ávila
5a8ae94f9c docs(filter): improve syntax for usage in templates 2013-04-24 21:55:58 +01:00
Laurent Cozic
6605adf6d9 feat($q): add $q.always() method
Add $q.always(callback) method that is always called whether the promise is successful or fails; includes unit tests and updates
documentation.
2013-04-24 20:56:18 +01:00
Misko Hevery
cd38cbf975 feat(controller): support as instance syntax
Support ng-controller="MyController as my" syntax
which publishes the controller instance to the
current scope.

Also supports exporting a controller defined with route:
````javascript
angular.module('routes', [], function($routeProvider) {
  $routeProvider.when('/home', {controller: 'Ctrl as home', templateUrl: '...'});
});
````
2013-04-22 23:28:41 -07:00
Misko Hevery
021bdf3922 fix($animator): remove dependency on window.setTimeout. 2013-04-22 23:13:26 -07:00
Oren Avissar
2f96fbd175 feat(ngIf): add directive to remove and recreate DOM elements
This directive is adapted from ui-if in the AngularUI project and provides a complement
to the ngShow/ngHide directives that only change the visibility of the DOM element and
ngSwitch which does change the DOM but is more verbose.
2013-04-19 21:45:38 +01:00
leesei
120b9190ea docs(input): fix typo on max attribute 2013-04-19 13:43:09 +01:00
Shyam Seshadri
f77b906d67 docs(select): fix attribute documentation
Select documentation was still referring to binding to name, when it should be ng-model instead. Fixed it.
2013-04-19 13:36:22 +01:00
Michal Reichert
4c7baf970f docs(ngBind): fix typo 2013-04-19 11:55:16 +01:00
Igor Minar
5da6b125a7 test(modules): fix module tests which got disabled by ngMobile
When ngMobile was merged in, we accidentaly included angular-scenario.js
in the test file set for modules. Loading this file overrode jasmine's
`it` and `describe` global functions which essentially disabled all of
~200 unit tests for wrapped modules.

This change refactors the code to run the wrapped module tests.

I had to extract browserTrigger from scenario runner in order to achieve
this without code duplication.
2013-04-18 14:34:53 -07:00
Pete Bacon Darwin
695c54c17b fix(i18n): escape all chars above \u007f in locale files
Modify the script that writes the locales so all characters above \u007f are escaped
Includes the updated locale files after running the closureI18nExtractor.

Closes #2417
2013-04-17 22:13:49 +01:00
Mark Dalgleish
363e4cbf64 fix(ngModel): use paste/cut events in IE to support context menu
In IE the model is not updated when the input value is modified using the context
menu, e.g. pasting from the clipboard, or cutting all or part of the current value.
To capture these changes, we bind to the proprietary 'paste' and 'cut' events.

Closes #1462
2013-04-17 21:20:08 +01:00
es128
c4d5631f1a doc(ngClassEven): make consistent with ngClassOdd 2013-04-17 14:51:41 +01:00
@fbiville
9f2aaca65b docs(injector): fix typo in inlining example
The actual invoke call in the documentation was referring to the non-existent tempFn instead of tmpFn
2013-04-17 14:46:13 +01:00
austingreco
12b6deb1ce fix(ngPattern): allow modifiers on inline ng-pattern
Add support for regex modifiers on inline `ng-pattern`.
`ng-pattern="/regex/i"` now validates correctly.

Closes #1437
2013-04-16 14:49:17 -07:00
Francesc Rosàs
b8f0b432fd docs($q): fix incorrect @returns tag for $q.when() 2013-04-16 13:37:07 +01:00
Pete Bacon Darwin
0ac969a5ee fix(ngClass): should remove classes when object is the same but property has changed
If you wire up ngClass directly to an object on the scope, e.g. ng-class="myClasses",
where scope.myClasses = { 'classA': true, 'classB': false },
there was a bug that changing scope.myClasses.classA = false, was not being picked
up and classA was not being removed from the element's CSS classes.

This fix uses angular.equals for the comparison and ensures that oldVal is a copy of
(rather than a reference to) the newVal.
2013-04-16 13:15:49 +01:00
Misko Hevery
58ef32308f fix($location): fix URL interception in hash-bang mode
Closes #1051
2013-04-15 12:05:27 -07:00
Pete Bacon Darwin
a748410f52 docs(rootScope): fix typo 2013-04-15 11:44:49 +01:00
Laurent
c25343f8be docs(rootScope): Fix various typos 2013-04-15 11:42:57 +01:00
Laurent
cc1e4225b7 docs(Angular.js): fix typo 2013-04-15 11:42:34 +01:00
brandonjp
c746d65857 docs(ngController): fix docs link to api/ng.$route 2013-04-13 18:24:40 +02:00
Igor Minar
ab755a25f9 fix(Scenario): correct bootstrap issue on IE
we need to set the deferred bootstrap flag via window.name after the iframe's
src has been set, otherwise IE will reset it to empty string
2013-04-13 00:42:51 -07:00
Misko Hevery
570463a465 fix(ngAnimate): prevent animation on initial page load 2013-04-11 23:06:07 -07:00
Misko Hevery
a0bc71e271 fix(ngRepeat): prevent initial duplicates 2013-04-11 23:06:07 -07:00
Lee Leathers
fe1696f688 style(exceptionHandler): add ws 2013-04-11 15:32:20 -07:00
winkler1
aa3acc5229 docs(animator): fix typo 2013-04-11 15:14:46 -07:00
Christoph Burgdorf
15d80af53c docs(jqLite): clarified that children/parent do not support selectors 2013-04-11 15:11:28 -07:00
Matt Haggard
a92bb2e025 docs: fix typos 2013-04-11 15:03:59 -07:00
Brent Morrow
d521ad3ff6 docs(ngApp): fixed typo
Use this directive to auto-bootstrap **an** application.
2013-04-11 14:58:39 -07:00
Matias Niemelä
1351ba2632 fix(ngAnimate): skip animation on first render 2013-04-11 14:15:20 -07:00
Matias Niemelä
5476cb6e9b feat($animator): allow to globally disable and enable animations 2013-04-11 14:15:20 -07:00