Commit Graph

2752 Commits

Author SHA1 Message Date
Phil Westwell
0dc35efd7c docs(*): fix its/it's grammar
Closes #7580
2014-05-31 18:43:26 -04:00
zainengineer
4a57b1501e docs(orderBy): add example of directly calling $filter('orderBy')
It's not a bad example of sorting fields in a table, which is something people are frequently wanting
to do. So I say, LGTM!
                        ~caitp, 1988-2014

Closes #7602
2014-05-31 18:24:56 -04:00
ImaginaryDevelopment
dd7b508326 docs(ngKeyup): improve example
show implicit `$event` argument
2014-05-30 16:18:24 -07:00
Shahar Talmi
7eaaca8ef2 fix(ngClass): support multiple classes in key 2014-05-30 11:53:50 -07:00
rodyhaddad
083f496d46 fix(angular.copy): support circular references in the value being copied
Closes #7618
2014-05-30 11:45:57 -07:00
rodyhaddad
a87135bb43 chore(shallowCopy): handle arrays and primitives, and switch to using it where possible
In many cases, we want a shallow copy instead of a full copy

Closes #7618
2014-05-30 11:45:47 -07:00
Paul Jolly
11170aee42 docs($rootScope): fix incorrect docs about how dirty checking is done 2014-05-30 10:32:29 -07:00
Andrew Kulinich
9f5c437048 fix(ngAnimate): fix property name that is used to calculate cache key
Fix property name that introduced a bug that occurs when there are 2 animations per page
with similar signature. Due to mistype they were assigned same cache key so second
animation was processed incorrectly

Closes #7566
2014-05-30 01:04:07 -04:00
Vojta Jina
56c60218d1 fix($compile): bound transclusion to correct scope
Nested isolated transclude directives.

This improves/fixes the fix in d414b78717.

See the changed ng-ifunit test: The template inside ng-if should be bound to the
isolate scope of `iso` directive (resp. its child scope). Not to a child of
the root scope. This shows the issue with ng-if. It’s however problem with
other directives too.

Instead of remembering the scope, we pass around the bound parent transclusion.
2014-05-29 12:54:03 -07:00
Vojta Jina
0c8a2cd2da fix($compile): set the iteration state before linking
This issue was introduced in b87e5fc092.
The state for each row has to be set up *before* linking.

The cloneFn (the function passed into $transclude) is called *before* actual linking and thus it is enough to update the state inside the cloneFn callback.
2014-05-29 12:53:06 -07:00
Peter Bacon Darwin
2ee29c5da8 fix($compile): don't pass transcludes to non-transclude templateUrl directives 2014-05-29 12:52:12 -07:00
Peter Bacon Darwin
e3003d5342 style(ngRepeat): jshint was complaining about var names 2014-05-29 12:52:12 -07:00
Peter Bacon Darwin
b87e5fc092 fix(ngRepeat): ensure that the correct (transcluded) scope is used 2014-05-29 12:52:12 -07:00
Peter Bacon Darwin
d71df9f83c fix(ngIf): ensure that the correct (transcluded) scope is used 2014-05-29 12:52:12 -07:00
Peter Bacon Darwin
19af039745 fix($compile): don't pass transclude to template of non-transclude directive
If a directive provides a template but is not explicitly requesting transclusion
then the compiler should not pass a transclusion function to the directives
within the template.
2014-05-29 12:52:12 -07:00
Peter Bacon Darwin
6e15462267 refactor($compile): no need to use bind 2014-05-29 12:52:12 -07:00
Peter Bacon Darwin
d414b78717 fix($compile): fix nested isolated transclude directives
Closes #1809
Closes #7499
2014-05-29 12:52:11 -07:00
Peter Bacon Darwin
ad0c5107ba refactor($compile): change parameter name
The boundTransclusionFn that is passed in is really the one from the
parent node.  The change to parentBoundTranscludeFn clarifies this compared
to the childBoundTranscludeFn.
2014-05-29 12:52:11 -07:00
Peter Bacon Darwin
1fef5fe823 fix($compile): pass transcludeFn down to nested transclude directives
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Handles the regression identified in e994259739

Fixes #7240
Closes #7387
2014-05-29 12:52:11 -07:00
Vojta Jina
c4b04cec74 style(ngTouch): make lint happy 2014-05-29 12:51:48 -07:00
Carlo s A. Guillen
84218af475 docs(ngClick): improve style 2014-05-28 18:02:50 -07:00
Pavel Pomerantsev
7a9d24551f docs($rootScope): fix incorrect docs and make them clearer
During the first $digest loop after registering a $watch
the listener always run, so the example was incorrect

Closes #7598
2014-05-28 17:38:09 -07:00
Erin Altenhof-Long
0dbec22bc7 docs(ngClick): improve style 2014-05-28 17:29:33 -07:00
Brian Ford
279f00b05b docs($http): use HTTPS URLs in JSONP example 2014-05-28 14:04:22 -07:00
Peter Bacon Darwin
2859fc408e docs(ngController): add formatting to controller as description and example
Adds to #7591
2014-05-27 22:43:37 +01:00
Richard Littauer
462eefc1e4 docs(ngController): add more description of controller as syntax
Using `controller as` in the template is not described well
in the docs, as both `scope` injection and `this` are presented
equally without too much discussion of the advantages of using
either. I added a bit more discussion based on google's internal
style guidelines.

Closes #7591
Closes #5076 (until Angular 2.0 comes out and we refactor everything)
2014-05-27 22:06:17 +01:00
Richard Littauer
3fc95e06e7 docs(ngView): remove reference to scope
$route.name.scope.current returns undefined in the docs example,
as scope is never injected into the relevant controller.
Scope doesn't need to be there, so it's best to just remove it.

Suggested in #5076.
2014-05-24 13:41:37 -07:00
Matias Niemelä
98b9d68ea3 fix($animate): retain inline styles for property-specific transitions
Transitions that are run through ngAnimate which contain a specific property
cause any inline styles to be erased after the animation is done. This has
something to do with how the browsers handle transitions that do not use
"all" as a transition property.

Closes #7503
2014-05-23 14:45:20 -07:00
Lucas Galfaso
cee429f0aa feat(*): lazy one-time binding support
Expressions that start with `::` will be binded once. The rule
that binding follows is that the binding will take the first
not-undefined value at the end of a $digest cycle.

Watchers from $watch, $watchCollection and $watchGroup will
automatically stop watching when the expression(s) are bind-once
and fulfill.

Watchers from text and attributes interpolations will
automatically stop watching when the expressions are fulfill.

All directives that use $parse for expressions will automatically
work with bind-once expressions. E.g.

<div ng-bind="::foo"></div>
<li ng-repeat="item in ::items">{{::item.name}};</li>

Paired with: Caitlin and Igor
Design doc: https://docs.google.com/document/d/1fTqaaQYD2QE1rz-OywvRKFSpZirbWUPsnfaZaMq8fWI/edit#
Closes #7486
Closes #5408
2014-05-23 14:40:51 -07:00
rodyhaddad
fa6e411da2 fix($parse): remove deprecated promise unwrapping
The feature has been deprecated in #4317

BREAKING CHANGE: promise unwrapping has been removed.
It has been deprecated since 1.2.0-rc.3.

It can no longer be turned on.
Two methods have been removed:
* $parseProvider.unwrapPromises
* $parseProvider.logPromiseWarnings
2014-05-22 22:50:34 -07:00
Julie
7e1950e9f1 chore(tests): remote iit that sneaked into ngStyle 2014-05-22 18:00:46 -07:00
rodyhaddad
1d37239eaf refactor($parse): remove the support of JSON parsing mode
It's a feature that isn't exposed to the public, and is
no longer used internally.
2014-05-22 15:18:37 -07:00
Jesse Palmer
f694951b3f style: added whitespace
spaces between the ')' and '{' make code a tad easier to read.

Closes #7542
2014-05-22 08:50:26 -07:00
Kevin Aenmey
1445130869 docs($cacheFactory): fix typo 2014-05-21 16:28:07 -07:00
Tobias Bosch
eec6394a34 docs($compile): deprecate replace directives
BREAKING CHANGE:

The `replace` flag for defining directives that
replace the element that they are on will be removed in the next
major angular version.
This feature has difficult semantics (e.g. how attributes are merged)
and leads to more problems compared to what it solves.
Also, with WebComponents it is normal to have custom elements in the DOM.
2014-05-21 16:08:02 -07:00
Jeff Whelpley
1ab6e908b1 fix($compile): do not merge attrs that are the same for replace directives
If a directives specifies `replace:true` and the template of the directive contains
a root element with an attribute which already exists at the place
where the directive is used with the same value, don't duplicate the value.

Closes #7463
2014-05-21 15:51:19 -07:00
Jesse Palmer
40b8721ba3 docs($interpolate): removed function name to match other examples 2014-05-21 15:49:24 -07:00
Freek Wielstra
1fe0d9990e docs($http): clear up Interceptor docs and code
The documentation and code example of $http interceptors is unclear about whether config can be null
or not, and whether the result should always be a promise or not. This pr clears up the documentation
a bit and removes the literal 'or a promise' interpretation of the docs in the code example.

Closes #7431
Closes #7460
2014-05-21 15:35:55 -07:00
NateRedding
f2f5a1dd39 docs(ngHide): corrected logic in example
Closes #7436
2014-05-21 15:26:29 -07:00
Edward Brey
510c328d74 docs(filter): description formatting fix
as it was, the third parameter's description was displayed as
a code block, rather than a bulletted list.
2014-05-21 13:57:25 -07:00
James Vanneman
636b3799b3 docs($filter): add runnable example
Closes #6871
2014-05-21 21:26:20 +01:00
ABitTooCalm
d02fa32f36 docs(ngStyle): clarify using styles that are not valid property names
Closes #6838
2014-05-21 21:07:13 +01:00
Kristof Mattei
84402b11c8 docs(shallowCopy): fixed typo
Closes #7456
2014-05-21 11:41:57 -07:00
Tobias Bosch
d606e66f7a docs(ngModelController): use $sce and $sanitize in the contenteditable example.
Closes #7464
2014-05-21 11:36:34 -07:00
Tobias Bosch
326fd809c8 docs(): mention implicit usage of 2014-05-21 11:23:38 -07:00
Sergei Z
854bf5b74d feat(ngMock): add support of mocha tdd interface
Closes #7489
2014-05-21 10:43:32 -07:00
Yaron Uliel
7e4598663a docs(ngRepeat): fix formatting 2014-05-21 10:27:37 -07:00
Takashi Nakagawa
21a3cea657 docs(ngModelController): fix indentation code block
Closes #6660
2014-05-21 17:09:37 +01:00
Peter Bacon Darwin
826450da20 docs($compile): remove reference to ngRepeat providing compile function
ngRepeat no longer has the compile function in its directive definition
object, since it retrieves its transclusion via the link function.

Closes 5638
2014-05-21 14:27:06 +01:00
Wes Alvaro
ad0d3e0f1b docs(ngRoute): $routeParams is Object.<string, string>
Closes #7386
2014-05-21 12:48:37 +01:00