Commit Graph

4525 Commits

Author SHA1 Message Date
frandroid
f7ce415c67 docs(tutorial/step_05): fix services link 2014-03-19 00:24:34 +00:00
frandroid
4cf2adfeda docs(tutorial/step_05): removed stray "a" 2014-03-18 16:10:38 -07:00
Igor Minar
2b84f43a6d style(ngMocks): remove ws 2014-03-18 15:54:17 -07:00
Caio Cunha
d6cfcacee1 feat(ngMock.$httpBackend): added support for function as URL matcher
It's now possible to pass a function to match the URL in $httpBackend mocked
expectations. This gives a more sophisticate control over the URL matching
without requiring complex RegExp mantainance or the workaround of creating
an object with a `test` function in order to mimic RegExp interface.

This approach was suggested in [this
thread](https://groups.google.com/d/msg/angular/3QsCUEvvxlM/Q4C4ZIqNIuEJ)

Closes #4580
2014-03-18 15:19:26 -07:00
Caio Cunha
299b220f5e feat($compile): add support for $observer deregistration
In order to make the behavior compatible with $rootScope.$watch and $rootScope.$on methods, and
make it possible to deregister an attribute observer, Attributes.$observe method now returns a
deregistration function instead of the observer itself.

BREAKING CHANGE: calling attr.$observe no longer returns the observer function, but a
    deregistration function instead.

    To migrate the code follow the example below:

    Before:

```
    directive('directiveName', function() {
      return {
        link: function(scope, elm, attr) {
          var observer = attr.$observe('someAttr', function(value) {
            console.log(value);
          });
        }
      };
    });
```

    After:

```
    directive('directiveName', function() {
      return {
        link: function(scope, elm, attr) {
          var observer = function(value) {
            console.log(value);
          };

          attr.$observe('someAttr', observer);
        }
      };
    });
```

Closes #5609
2014-03-18 13:44:16 -07:00
Igor Minar
78057a945e fix(Scope): $watchCollection should call listener with oldValue
Originally we destroyed the oldValue by incrementaly copying over portions of the newValue
into the oldValue during dirty-checking, this resulted in oldValue to be equal to newValue
by the time we called the watchCollection listener.

The fix creates a copy of the newValue each time a change is detected and then uses that
copy *the next time* a change is detected.

To make `$watchCollection` behave the same way as `$watch`, during the first iteration
the listener is called with newValue and oldValue being identical.

Since many of the corner-cases are already covered by existing tests, I refactored the
test logging to include oldValue and made the tests more readable.

Closes #2621
Closes #5661
Closes #5688
Closes #6736
2014-03-18 12:00:50 -07:00
Igor Minar
c5e41a0325 chore(log): add log.empty() method to the testing logger
`log.empty()` is the same as `log.reset()`, except thati `empty()`  also returns the current array with messages

instead of:

```
// do work
expect(log).toEqual(['bar']);
log.reset();
```

do:

```
// do work
expect(log.empty()).toEqual(['bar']);
```
2014-03-18 12:00:50 -07:00
Siddique Hameed
748a6c8d9d fix(angular.bootstrap): only allow angular to load once
This is hard to test as a unit-test, since it involves the actual loading
of angular, but it turns out that it is easy to test using a protractor
e2e test.

Closes #5863
Closes #5587
2014-03-18 12:02:19 +00:00
Peter Bacon Darwin
ed4cd6c3c6 chore(utils): fix version number processing
The changes to version-info meant that the version being injected into
the code at build time was missing the "dot" (patch) version and the
release code-name.
2014-03-18 10:43:17 +00:00
Peter Bacon Darwin
4cc00e7aed chore(version-info): previousVersions should not return undefined
Closes #6702
2014-03-18 07:11:59 +00:00
Peter Bacon Darwin
f7b36844e6 docs(guide/concepts): move ng-app into example text
Closes #6639
2014-03-18 07:07:45 +00:00
Peter Bacon Darwin
959297c38a chore(package.json): update dgeni-packages dependency 2014-03-18 07:07:45 +00:00
Caitlin Potter
f8f97f8b61 style($templateCache): remove trailing whitespace
This was introduced by 2ca6d650e8, somewhat inexplicably as I had run
grunt ci-checks locally. But regardless, this should fix this up.
2014-03-17 21:47:25 -04:00
Jesse Palmer
2ca6d650e8 docs($templateCache): use GFM example format rather than <pre> tags
Updated example formatting.

Closes #6068
2014-03-17 20:12:00 -04:00
Edward Brey
547871e779 docs(loader): add annotations to example 2014-03-17 16:38:10 -07:00
Tyler Kellogg
a4b70cfd71 docs($cookies): cookies serializer only supports strings
Closes #6705
2014-03-17 16:29:10 -07:00
poshest
c9fbb472b7 docs(errors/$compile/nonassing): update nonassign.ngdoc
It might seem obvious that if you don't supply "bind" attribute in this case, you'll get an error,
but I feel this is worth adding to the doc.

Closes #6725
2014-03-17 16:13:34 -07:00
Sekib Omazic
df6d34c52b docs(css): RegExp doesn't have .type-hint-regexp class
type-hint-regexp gets a nice color

closes #6596
2014-03-17 16:05:40 -07:00
Gias Kay Lee
ed22869e08 docs(module): add link to mentioned resource
Closes #6628
2014-03-17 15:15:51 -07:00
Gias Kay Lee
ee07b502a2 docs(css): Fix word breaks issue in <pre>
Closes #6586
2014-03-17 15:08:53 -07:00
wbyoko
63ec18f5c9 docs(migration): note that services can now return functions
This change mostly effects preprocessed javascript.
2014-03-17 15:06:53 -07:00
Takashi Nakagawa
e381c4dd09 chore(formatting): removed unnecessary white spaces 2014-03-17 14:57:29 -07:00
unicodesnowman
68e84acec9 docs(ngView): remove global controller definitions
instead use angular modules
also fix formatting
2014-03-17 14:55:00 -07:00
Neil Johnston
e118a8be34 docs(tutorial/step_02): add experiment to update controller test
Add an experiment to update the controller unit test after modifying it
with the new model property.
2014-03-17 14:38:51 -07:00
Sekib Omazic
9202767f41 docs(booleanAttrs): fix typo 2014-03-17 14:19:40 -07:00
Jan Hancic
7fb88698dc docs(tutorial/step_12): link to API docs 2014-03-17 14:11:58 -07:00
Peter Bacon Darwin
bdcc657c7e chore(angularjs.org/publish.sh): align release script with new website
Closes #6690
2014-03-17 21:09:45 +00:00
David Rogers
c995b09b77 docs(ngForm): remove duplicate @param annotation
When the example for `ngAnimate` was added in commit:3344396, the `@param name` annotation was unintentionally duplicated. Remove this duplicate.

Closes #6720
2014-03-17 17:05:57 -04:00
Caitlin Potter
8a96f317e5 fix(jqLite): traverse host property for DocumentFragment in inheritedData()
If dealing with a document fragment node with a host element, and no parent, use the host
element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
to lookup parent controllers.

Closes #6637
2014-03-17 16:52:48 -04:00
Mark Jones
d3aa14bc11 docs(ngInclude): make the quote type explicit 2014-03-17 13:20:06 -07:00
linclark
cd49876e34 docs($http): update shortcut method description
Update docs to reflect that $http no longer requires passing in an HTTP method, as changed in #6401.
2014-03-17 13:07:15 -07:00
bradwheel
55a0bc453c docs(ngRoute): remove global controller syntax in the example 2014-03-17 12:50:14 -07:00
Igor Minar
2daaf3ea19 docs(triaging): correct information about milestones 2014-03-17 10:35:21 -07:00
Denis Parchenko
e1484cdf65 docs(guide/module): remove duplicate word
Closes #6709
2014-03-17 12:44:16 -04:00
Brian Andersen
d0781eb1a3 docs(tutorial): fix broken link
On page http://docs.angularjs.org/tutorial/step_05 link is broken.

Should point to http://docs.angularjs.org/guide/services NOT http://docs.angularjs.org/guide/dev_guide.services

Closes #6714
2014-03-17 12:20:22 -04:00
Peter Bacon Darwin
d09056d287 docs(runnableExamples): add "edit in Plunker" button
The "runnableExample.template.html" template overrides the one in the
dgeni-packages "examples" package with a similar template that also has
a link to a special Plunker URL that can pull in the example from our
code.angularjs.org website.
2014-03-17 12:43:10 +00:00
Peter Bacon Darwin
849e4472e1 chore(shrinkwrap): grunt-jasmine-node is retrieved from github 2014-03-17 10:01:44 +00:00
Caitlin Potter
f55278fa8a docs(misc/contribute): make anchor links work properly
Closes #6706
2014-03-17 00:21:28 -04:00
Brian Andersen
df5624147f docs(tutorial): fix broken link
Fixed a minor error in link

Closes #6701
2014-03-16 13:35:21 -04:00
Emile Silvis
91e6d1d22f docs(guide/tutorial): make capitalization of "Angular" consistent
- step_05.ngdoc
- step_06.ngdoc
- step_07.ngdoc
- step_08.ngdoc

Closes #6686
Closes #6687
Closes #6688
Closes #6689
2014-03-15 15:30:25 -04:00
Bruno Baia
b8cc71d476 fix($http): allow sending Blob data using $http
Closes #5012
2014-03-15 19:41:07 +01:00
Igor Minar
511422adb0 chore(package.json): update karma to 0.12.0 2014-03-14 23:06:04 -07:00
Peter Bacon Darwin
dd3587a8c1 chore(clean-shrinkwrap): add a utility to clean up the shrinkwrap file
This is to deal with https://github.com/npm/npm/issues/3581

See the previous commit for more info.

Closes #6672
2014-03-14 23:01:54 -07:00
Igor Minar
e5dd832b20 chore(npm): clean up shrinkwrap file, remove unused properties
from our experiements it appears that the presense or absense of the from and resolved properties
makes no difference on the behavior of  but  updates these properties
with different values depending on different state of the cache and node_modules.

So in order to get clean diffs during updates, we are just going to drop these properties and have
a script to do this automatically.

Long term this should be fixed in npm: https://github.com/npm/npm/issues/3581
2014-03-14 23:01:53 -07:00
jenkins
a15d9cb4b6 chore(release): update cdn version 2014-03-14 17:40:25 -07:00
Vojta Jina
9bfbb16e23 chore(scripts): fix the versions script again v1.3.0-beta.2 2014-03-14 16:26:40 -07:00
Vojta Jina
2b741dc8b8 chore(scripts): fix the versions script 2014-03-14 15:59:23 -07:00
Vojta Jina
e888dde3c5 chore(scripts): disable testing seed and phonecat during a release
This reverts commit d5294ebfa0.

It turned out to be more work and I don't wanna deal with it right now.
2014-03-14 14:48:56 -07:00
Vojta Jina
d5294ebfa0 chore(scripts): test seed and phonecat during a release 2014-03-14 14:24:43 -07:00
Vojta Jina
6d6ebf7c61 chore(scripts): make the release script more flexible
Now the SHA can be short/long, whateva.
2014-03-14 14:24:21 -07:00