Commit graph

2694 commits

Author SHA1 Message Date
Pete Bacon Darwin
be993528a3 docs(guide::testing): fix link to angular-seed 2013-05-18 22:17:15 +01:00
Chris M
3b69eaebcd docs(ngMock::$log): improve the $log.*.logs descriptions
Because ngDoc generation only takes the last segment of a property name,
each $log.[error|warn|log...].logs property has the same name and is
confusing in the docs.
This commit helps this by adding a link to the $log.* method and also an
appropriate usage example.
2013-05-18 22:13:58 +01:00
Joakim Blomskøld
782a82d461 doc(ngModel): $setViewValue calls all parsers, not formatters 2013-05-18 21:17:51 +01:00
Ben Ripkens
2ab4fde817 docs(guide): add API documentation for ngScenario matchers
Matchers are briefly mentioned in the e2e test guide, but there is no
documentation for the available matchers.
2013-05-18 21:00:45 +01:00
Andrew Vida
1c7741329f docs(tutorial): update test config file name 2013-05-18 20:29:17 +01:00
Jeremy Wilken
a7ba27b92c doc(guide:$location): fix example for two way databinding.
When you are watching the $location.path(), it has to be wrapped in a
function since it is not attached to the scope and if you pass a string
to $scope.$watch it is evaluated against the $scope.
2013-05-17 19:16:55 +01:00
Zach Snow
2a7043fa23 test($parse): improve clarity of ternary tests 2013-05-17 06:46:09 +01:00
Igor Minar
8f69ffce47 chore(docs): fix syntax error in docs.css 2013-05-16 16:39:13 -07:00
Matias Niemelä
c53d4c9430 feat($animator): provide support for custom animation events 2013-05-16 16:17:46 -07:00
Matias Niemelä
24ed61cf5c test($animator): ensure invalid $sniffer.transitions and $sniffer.animations flags are caught in animation spec code 2013-05-16 16:17:46 -07:00
Matias Niemelä
3a49b7eec4 feat(ngdocs): Add FullText search to replace Google search in docs 2013-05-16 16:17:46 -07:00
Julie
0401a7f598 fix(jqLite): pass a dummy event into triggerHandler
Previously, anchor elements could not be used with triggerHandler because
triggerHandler passes null as the event, and any anchor element with an empty
href automatically calls event.preventDefault(). Instead, pass a dummy event
when using triggerHandler, similar to what full jQuery does. Modified from
PR #2379.
2013-05-16 16:15:31 -07:00
Zach Snow
6798fec439 feat($parse): add support for ternary operators to parser
Add '?' token to lexer, add ternary rule to parser at
(hopefully) proper precedence and associativity (based
on https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Operator_Precedence).
Since (exp1 && exp2 || exp3) is supported by the parser,
and (exp1 ? exp2 : exp3) works the same way, it seems
reasonable to add this minor form of control to templates
(see #719).
2013-05-16 22:30:37 +01:00
Ryan Schumacher
cefbcd470d fix($resource): null default param results in TypeError
Fixes issue when setting a default param as `null` error
`TypeError: Cannot read property 'charAt' of null`
2013-05-16 14:26:08 -07:00
Daniel Stockton
f9b897de4b feat($http): add a default content type for PATH requests
The default header is now application/json which while not perfect
in all cases is better than the browser default application/xml.

The new headers also makes for better compatibility with Rails 4
2013-05-16 14:05:05 -07:00
Matt Haggard
1f99c3a521 doc(guide): add links to angular-seed examples
The examples in the angular-seed project are better than nothing,
which is what we currently have here!
2013-05-16 22:02:16 +01:00
Dean Sofer
a380fc4624 docs(ngCsp): add more informative details
Transferred from https://github.com/angular/angular.js/wiki/Using-AngularJS-in-a-Chrome-Extension-environment
2013-05-16 21:22:07 +01:00
jamesBrennan
99cd86a96e docs(guide:understanding_controllers): remove outdated info
Remove the outdated info in this document related to this API change
https://github.com/angular/angular.js/blob/master/src/ng/rootScope.js#L166
2013-05-15 21:32:15 +01:00
Samuel Santos
d551d72924 feat(ngSrcset): add new ngSrcset directive
In line with ngSrc and ngHref, this new directive ensures that the
`srcset` HTML5 attribute does not include a pre-interpolated string.
Without it the browser will fetch from the URL with the literal text
`{{hash}}` until AngularJS replaces the expression inside `{{hash}}`.

Closes #2601
2013-05-14 21:29:21 +01:00
Andreas Marek
629fb37351 feat(scenario): adds mousedown and mouseup event triggers to scenario
Added mousedown and mouseup event triggers to scenadio dsl 'element' expression.
Added mousedown and mouseup to the custom jquery trigger method to generate real events.
2013-05-14 20:50:36 +01:00
Siddique Hameed
908821e20a docs($timeout): minor cleanup
Added a comma separator in the statement
Removed the word the from the statement
Used whose instead of who's in the following statement
Italicized false in the statement
Used a comma separator in the statement
2013-05-14 20:47:39 +01:00
Glenn Goodrich
53061363c7 feat($resource): collapse empty suffix parameters correctly
Previously only repeated `/` delimiters were collapsed into a
single `/`.  Now, the sequence `/.` at the end of the template, i.e.
only followed by a sequence of word characters, is collapsed into a single
`.`. This makes it easier to support suffixes on resource URLs.
For example, given a resource template of `/some/path/:id.:format`, if
the `:id` is `""` but format `"json"` then the URL is now
`/some/path.json`, rather than `/some/path/.json`.

BREAKING CHANGE: A `/` followed by a `.`, in the last segment of the
URL template is now collapsed into a single `.` delimiter. For example:
`users/.json` will become `users.json`. If your server relied upon this
sequence then it will no longer work. In this case you can now escape the
`/.` sequence with `/\.`
2013-05-14 20:01:15 +01:00
quazzie
c32a859bdb feat(select): match options by expression other than object identity
Extend ng-options with a new clause, "track by [trackByExpression]", which can be used when
working with objects.  The `trackByExpression` should uniquely identify select options objects.
This solves the problem of previously having to match ng-options objects by identity.
You can now write: `ng-options="obj as obj.name for obj in objects track by obj.id"`
The "track by" expression will be used when checking for equality of objects.

Examples:
<select
    ng-model="user.favMovieStub"
    ng-options="movie as movie.name for movie in movies track by movie.id">
</select>

scope: {
  user: { name: 'Test user', favMovieStub: { id: 1, name: 'Starwars' } }
  movies: [{ id: 1, name: 'Starwars', rating: 5, ... }, { id: 13, ... }]
}

The select input will match user favMovieStub to the first movie in the movies array, and show
"Star Wars" as the selected item.
2013-05-14 19:58:05 +01:00
Matias Niemelä
4acc28a310 feat(ngAnimate): cancel previous incomplete animations when new animations take place 2013-05-13 21:09:43 -07:00
Matias Niemelä
c8197b44eb feat(ngdocs): external links to github, plunkr and jsfiddle available for code examples 2013-05-13 16:55:14 -07:00
Matias Niemelä
b6e5972eb3 chore(ngdocs): update to new version of FontAwesome 2013-05-13 16:55:14 -07:00
Matias Niemelä
0930d9dfe7 chore($sniffer): replace remaining supportsTransitions/supportsAnimations flags inside tests 2013-05-13 18:12:25 -04:00
Matias Niemelä
3e4d43b42c docs(animation): fix code example to work with most recent ngAnimate
ngAnimate: Rename CSS classes in example code to work with new ngAnimate naming conventions
ngInclude: Include animations toggle in ngInclude example code
ngAnimate: Remove ms- prefix and fix up CSS animation example code
2013-05-13 14:09:03 +01:00
Chirayu Krishnappa
3952d35abe fix($browser): should use first value for a cookie.
With this change, $browser.cookies()["foo"] will behave like
docCookies.getItem("foo") where docCookies is defined at
https://developer.mozilla.org/en-US/docs/DOM/document.cookie

This fixes the issue where, if there's a value for the XSRF-TOKEN cookie
value with the path /, then that value is used for all applications in
the domain even if they set path specific values for XSRF-TOKEN.

Closes #2635
2013-05-11 09:28:14 -07:00
willtj
bffe6fa8a6 docs($scope): clarify documentation for $broadcast 2013-05-10 21:24:08 +01:00
veselinn
ac8ba104d4 docs(guide): fix a typo 2013-05-10 20:52:18 +01:00
Lucas Galfasó
67a4a25b89 fix(ngPluralize): handle the empty string as a valid override
Fix the check for overrides so it is able to handle the empty string

Closes #2575
2013-05-10 20:03:24 +01:00
Alfred Nutile
f6caab598f docs(guide): fix typo on model name 2013-05-10 14:58:00 +01:00
Alex Pods
04d4c738b5 docs(Angular.js) move forEach docs to correct place 2013-05-09 22:04:13 +01:00
Anatoly Shikolay
4ae4f1edd2 style(*): fix up semicolon and var usage 2013-05-09 15:01:22 +01:00
Pete Bacon Darwin
40c36ee7fe docs(tutorial): add comment about injection annotation
Closes: #1163
2013-05-09 13:56:36 +01:00
Pete Bacon Darwin
02ad012e7f docs($window): fix example 2013-05-09 12:47:41 +01:00
Misko Hevery
29efd39745 fix(scenario): update to use our angular-scenario.js rather then karma 2013-05-08 16:40:35 -07:00
Matias Niemelä
11f712bc3e chore(ngAnimate): CSS classes X-setup/X-start -> X/X-active
BREAKING CHANGE: css classes foo-setup/foo-start become foo/foo-active

The CSS transition classes have changed suffixes. To migrate rename
.foo-setup {...} to .foo {...}
.foo-start {...} to .foo-active {...}

or for type: enter, leave, move, show, hide

.foo-type-setup {...} to .foo-type {...}
.foo-type-start {...} to .foo-type-active {...}
2013-05-08 16:03:31 -07:00
Matias Niemelä
14757874a7 feat(ngAnimate): Add support for CSS3 Animations with working delays and multiple durations 2013-05-08 15:56:53 -07:00
Matias Niemelä
88c3480aff feat($sniffer): Add support for supportsAnimations flag for detecting CSS Animations browser support 2013-05-08 15:40:37 -07:00
Matias Niemelä
0cb04e2e91 chore(ngIf): Add animation code to ngIf example and docs text to ngAnimate docs 2013-05-08 15:34:35 -07:00
Matias Niemelä
404c9a653a feat(ngdocs): add variable type hinting with colors 2013-05-08 15:25:56 -07:00
Igor Minar
ee2689051b refactor($resource): simplify url template expansion 2013-05-08 15:08:49 -07:00
Igor Minar
5137a15417 chore(docs): use done() in gen-docs.js 2013-05-08 07:57:34 -07:00
Igor Minar
35adade6ac test(sortedHtml): ignore bogus rowspan=1 and colspan=1 in IE 2013-05-08 07:57:34 -07:00
Igor Minar
86b33eb3f1 test(sortedHtml): fix comment support in sortedHtml helper 2013-05-08 07:57:34 -07:00
Igor Minar
202087f03d style($compile): clarify argument name 2013-05-08 07:57:33 -07:00
R. Merkert
6d0b325f7f fix(angular): do not copy $$hashKey in copy/extend functions.
Copying the $$hashKey as part of copy/extend operations makes little
sense since hashkey is used primarily as an object id, especially in
the context of the ngRepeat directive. This change maintains the
existing $$hashKey of an object that is being copied into (likewise for
extend).
It is not uncommon to take an item in a collection, copy it,
and then append it to the collection. By copying the $$hashKey, this
leads to duplicate object errors with the current ngRepeat.

Closes #1875
2013-05-08 12:45:32 +01:00
Illniyar
cf4729faa3 feat($cookieStore): $cookieStore.get now parses blank string as blank string
closes #1918
2013-05-08 10:04:07 +01:00