Skip to content

Commit 49759c9

Browse files
committed
2 parents b3901b5 + a8b0400 commit 49759c9

File tree

194 files changed

+8060
-3509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+8060
-3509
lines changed

CHANGELOG.md

+192-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,193 @@
1+
<a name="1.0.1"></a>
2+
# 1.0.1 thorium-shielding (2012-06-25)
3+
4+
5+
## Bug Fixes
6+
7+
- **$location:** don't throw exception while url rewriting if element was removed
8+
([3da4194f](https://github.com/angular/angular.js/commit/3da4194f98fa0c1ad1e5ab159719e4b25799e6d4),
9+
[#1058](https://github.com/angular/angular.js/issues/1058))
10+
- **$location:** prevent ie from getting into redirect loop
11+
([ffb27013](https://github.com/angular/angular.js/commit/ffb270130a4aaf3ddc2eb9d6211b46e1da136184),
12+
[#1075](https://github.com/angular/angular.js/issues/1075),
13+
[#1079](https://github.com/angular/angular.js/issues/1079),
14+
[#1085](https://github.com/angular/angular.js/issues/1085))
15+
16+
17+
18+
<a name="1.0.0"></a>
19+
# 1.0.0 temporal-domination (2012-06-13)
20+
21+
22+
## Bug Fixes
23+
24+
- **$location:**
25+
- correctly parse link urls in hashbang mode with a prefix
26+
([0f44964e](https://github.com/angular/angular.js/commit/0f44964e5e0f7e37d7fa3216bb10fd61fbf52ae2),
27+
[#1037](https://github.com/angular/angular.js/issues/1037))
28+
- fix link click interception in hash-bang mode
29+
([6593a3e0](https://github.com/angular/angular.js/commit/6593a3e0823f3c08079f05010f9628fc4503cd43),
30+
[#1051](https://github.com/angular/angular.js/issues/1051))
31+
32+
33+
<a name="1.0.0rc12"></a>
34+
# 1.0.0rc12 regression-extermination (2012-06-12)
35+
36+
## Bug Fixes
37+
38+
- **$location:** correctly parse link urls in hashbang mode
39+
([74fa65ec](https://github.com/angular/angular.js/commit/74fa65ecb7c4e2df966a179952b35700912e065f),
40+
[#1037](https://github.com/angular/angular.js/issues/1037))
41+
42+
43+
## Cleanup
44+
45+
- **$defer:** remove deprecated `$defer` service
46+
([9af7a919](https://github.com/angular/angular.js/commit/9af7a9198e2d30608ea6c40eedde03e44a6ef569))
47+
- **docs:** simplify api urls
48+
([f16150d5](https://github.com/angular/angular.js/commit/f16150d5f1b20b3d633b4402095ea89baa4be042))
49+
50+
51+
52+
<a name="1.0.0rc11"></a>
53+
# 1.0.0rc11 promise-resolution (2012-06-10)
54+
55+
## Features
56+
57+
- **$route:**
58+
- allow defining route async dependencies as promises and defer route change until all promises
59+
are resolved
60+
([885fb0dd](https://github.com/angular/angular.js/commit/885fb0dd0743859a8985c23e4d0c1855a2be711e))
61+
- rename template -> tempalteUrl and add support for inline templates
62+
([0a6e464a](https://github.com/angular/angular.js/commit/0a6e464a93d9a1e76a624b356054ce9ca4015f55))
63+
- **$compile:** simplify isolate scope bindings and introduce true two-way data-binding between
64+
parent scope and isolate scope
65+
([c3a41ff9](https://github.com/angular/angular.js/commit/c3a41ff9fefe894663c4d4f40a83794521deb14f))
66+
- **$injector:** provide API for retrieving function annotations
67+
([4361efb0](https://github.com/angular/angular.js/commit/4361efb03b79e71bf0cea92b94ff377ed718bad4))
68+
- **$location:** add $locatonChange[start|success] event - since events are cancelable, it's now
69+
possible to cancel route and location changes.
70+
([92a2e180](https://github.com/angular/angular.js/commit/92a2e1807657c69e1372106b0727675a30f4cbd7))
71+
- **$rootElement:** expose application root element as $rootElement service
72+
([85632cb4](https://github.com/angular/angular.js/commit/85632cb44c95617d73c369f3a03fb476a4d5c8a2))
73+
74+
75+
## Bug Fixes
76+
77+
- **$compile:** correctly merge class attr for replace directives (contributed by Max Martinsson,
78+
[fb99b539](https://github.com/angular/angular.js/commit/fb99b539b4d851773b43f1564f7032adb157c0db),
79+
[#1006](https://github.com/angular/angular.js/issues/1006))
80+
- **$http:** add utf-8 to default Content-Type header (post/put)
81+
([10f80d7d](https://github.com/angular/angular.js/commit/10f80d7d2918f98262090b425ecc294d9518aa7e))
82+
- **$timeout:** allow calling $timeout.cancel() with undefined (contributed by Ali Mills,
83+
[1904596e](https://github.com/angular/angular.js/commit/1904596e0c2330299e92f092bd7a6ceca8e97c30))
84+
- **jqLite:** don't eat event exceptions
85+
([416a7830](https://github.com/angular/angular.js/commit/416a7830403a579cc57cf3a0198193790dcd0bc6))
86+
87+
88+
## Breaking Changes
89+
90+
- **$beforeRouteChange and $afterRouteChange events were renamed to $routeChangeStart and
91+
$routeChangeSuccess**
92+
93+
This was done to make the naming consistent with $location events and also get events to
94+
categorize and order nicely just by alphabetical sorting.
95+
96+
([7c242821](https://github.com/angular/angular.js/commit/7c2428218893f59c6a4499667488009ca67f3385))
97+
98+
99+
- **`template` option in $route definition was renamed to `templateUrl`**
100+
101+
The `template` options in $route definition now represents the actual template string. To provide
102+
the template url use `templateUrl` option instead. This was done to unify the directive and $route
103+
definitions.
104+
105+
To migrate just rename `template` to `templateUrl`.
106+
([0a6e464a](https://github.com/angular/angular.js/commit/0a6e464a93d9a1e76a624b356054ce9ca4015f55))
107+
108+
109+
- **isolate scope bindings definition has changed**
110+
111+
To migrate the code follow the example below:
112+
113+
Before:
114+
115+
scope: {
116+
myAttr: 'attribute',
117+
myBind: 'bind',
118+
myExpression: 'expression',
119+
myEval: 'evaluate',
120+
myAccessor: 'accessor'
121+
}
122+
123+
After:
124+
125+
scope: {
126+
myAttr: '@',
127+
myBind: '@',
128+
myExpression: '&',
129+
// myEval - usually not useful, but in cases where the expression is assignable, you can use '='
130+
myAccessor: '=' // in directive's template change myAccessor() to myAccessor
131+
}
132+
133+
134+
- **the inject option for the directive controller injection was removed**
135+
136+
The removed `inject` wasn't generally useful for directives so there should be no code using it.
137+
([c3a41ff9](https://github.com/angular/angular.js/commit/c3a41ff9fefe894663c4d4f40a83794521deb14f))
138+
139+
140+
141+
<a name="1.0.0rc10"></a>
142+
# 1.0.0rc10 tesseract-giftwrapping (2012-05-23)
143+
144+
## Features
145+
146+
- **$timeout:** add `$timeout` service that supersedes `$defer`
147+
([4511d39c](https://github.com/angular/angular.js/commit/4511d39cc748288df70bdc258f98a8f36652e683),
148+
[#704](https://github.com/angular/angular.js/issues/704),
149+
[#532](https://github.com/angular/angular.js/issues/532))
150+
- **scope:** add `event.preventDefault()` and `event.defaultPrevented`
151+
([84542d24](https://github.com/angular/angular.js/commit/84542d2431d20de42d6ec27c9d3435dd72dbe2ee))
152+
153+
154+
## Bug Fixes
155+
156+
- **ngRepeat:** expose `$first`, `$middle` and `$last` instead of `$position`
157+
([1d388676](https://github.com/angular/angular.js/commit/1d388676e3b97b6171fc498e82545bd437ee6fd1),
158+
[#912](https://github.com/angular/angular.js/issues/912))
159+
- **jqLite:** use the same expando store structure as jQuery
160+
([acf095d1](https://github.com/angular/angular.js/commit/acf095d1783e30e750d046ef24e81b5a0a31fbd4))
161+
- **$rootScope:** infinite digest exception does not clear $$phase
162+
([5989a1ed](https://github.com/angular/angular.js/commit/5989a1eda2b9e289b467ef9741fb1476549c8fd9),
163+
[#979](https://github.com/angular/angular.js/issues/979))
164+
165+
166+
## Breaking Changes
167+
168+
- **ngRepeat - `$position` is not exposed in repeater scopes any more**
169+
170+
To update, search for `/\$position/` and replace it with one of `$first`, `$middle` or `$last`.
171+
([1d388676](https://github.com/angular/angular.js/commit/1d388676e3b97b6171fc498e82545bd437ee6fd1))
172+
173+
- **scope event's `cancel` method was renamed to `stopPropagation`**
174+
175+
The name was corrected in order to align better with DOM terminology.
176+
To update, search for `/\.\s*cancel\s*(/` and replace it with `.stopPropagation(` or
177+
`.preventDefault(` (or both) depending on what you actually need.
178+
([91db9920](https://github.com/angular/angular.js/commit/91db99208e197a73584a88a8d835eeb55c466335))
179+
180+
181+
## Deprecation Warnings
182+
183+
- **`$defer` service has been deprecated in favor of `$timeout` service**
184+
185+
The `$defer` service will be removed before 1.0 final, so please migrate your code.
186+
([4511d39c](https://github.com/angular/angular.js/commit/4511d39cc748288df70bdc258f98a8f36652e683))
187+
188+
189+
190+
1191
<a name="1.0.0rc9"></a>
2192
# 1.0.0rc9 eggplant-teleportation (2012-05-14)
3193

@@ -957,7 +1147,7 @@ behavior and migrate your controllers one at a time: <https://gist.github.com/16
9571147

9581148
- complete rewrite of the Scope implementation with several API and semantic changes. Please see:
9591149
- [angular.scope API docs](http://docs-next.angularjs.org/#!/api/angular.scope)
960-
- [scopes dev guide article](http://docs-next.angularjs.org/#!/guide/dev_guide.scopes)
1150+
- [scopes dev guide article](http://docs-next.angularjs.org/#!/guide/scopes)
9611151
- [scope.js source file](https://github.com/angular/angular.js/blob/master/src/Scope.js)
9621152
- breaking changes section of this changelog
9631153
- added event system to scopes (see [$on], [$emit] and [$broadcast])
@@ -1708,7 +1898,7 @@ with the `$route` service
17081898
[angular.bootstrap]: http://docs-next.angularjs.org/api/angular.bootstrap
17091899
[$anchorScroll]: http://docs-next.angularjs.org/api/angular.module.ng.$anchorScroll
17101900
[$cacheFactory]: http://docs-next.angularjs.org/api/angular.module.ng.$cacheFactory
1711-
[bootstrapping]: http://docs-next.angularjs.org/guide/dev_guide.bootstrap
1901+
[bootstrapping]: http://docs-next.angularjs.org/guide/bootstrap
17121902
[angular.copy]: http://docs-next.angularjs.org/api/angular.copy
17131903
[ng:app]: http://docs-next.angularjs.org/api/angular.directive.ng-app
17141904
[$compile]: http://docs-next.angularjs.org/api/angular.module.ng.$compile

README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
AngularJS
22
=========
33

4+
AngularJS lets you write client-side web applications as if you had a smarter browser. It lets use
5+
good old HTML (or HAML, Jade and friends!) as your template language and lets you extend HTML’s
6+
syntax to express your application’s components clearly and succinctly. It automatically
7+
synchronizes data from your UI (view) with your JavaScript objects (model) through 2-way data
8+
binding. To help you structure your application better and make it easy to test AngularJS teaches
9+
the browser how to do dependency injection and inversion of control. Oh yeah and it also helps with
10+
server-side communication, taming async callbacks with promises and deferreds; and make client-side
11+
navigation and deeplinking with hashbang urls or HTML5 pushState a piece of cake. The most important
12+
of all: it makes development fun!
13+
414
* Web site: http://angularjs.org
5-
* Tutorial: http://docs.angularjs.org/#!/tutorial
15+
* Tutorial: http://docs.angularjs.org/tutorial
616
* API Docs: http://docs.angularjs.org
7-
* Developer Guide: http://docs.angularjs.org/#!/guide
17+
* Developer Guide: http://docs.angularjs.org/guide
818

919
Compiling
1020
---------

angularFiles.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ angularFiles = {
1313
'src/ng/cacheFactory.js',
1414
'src/ng/compile.js',
1515
'src/ng/controller.js',
16-
'src/ng/defer.js',
1716
'src/ng/document.js',
1817
'src/ng/exceptionHandler.js',
1918
'src/ng/interpolate.js',
@@ -29,6 +28,7 @@ angularFiles = {
2928
'src/ng/http.js',
3029
'src/ng/httpBackend.js',
3130
'src/ng/locale.js',
31+
'src/ng/timeout.js',
3232

3333
'src/ng/filter.js',
3434
'src/ng/filter/filter.js',
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@ngdoc overview
2-
@name angular.module.ng
2+
@name ng
33
@description
44

55
The `ng` is an angular module which contains all of the core angular services.

docs/content/cookbook/buzz.ngdoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ to retrieve Buzz activity and comments.
1212
<doc:example>
1313
<doc:source>
1414
<script>
15-
BuzzController.$inject = ['$resource'];
16-
function BuzzController($resource) {
17-
this.userId = 'googlebuzz';
18-
this.Activity = $resource(
15+
BuzzController.$inject = ['$scope', '$resource'];
16+
function BuzzController($scope, $resource) {
17+
$scope.userId = 'googlebuzz';
18+
$scope.Activity = $resource(
1919
'https://www.googleapis.com/buzz/v1/activities/:userId/:visibility/:activityId/:comments',
2020
{alt: 'json', callback: 'JSON_CALLBACK'},
2121
{ get: {method: 'JSONP', params: {visibility: '@self'}},
@@ -24,10 +24,10 @@ to retrieve Buzz activity and comments.
2424
}
2525
BuzzController.prototype = {
2626
fetch: function() {
27-
this.activities = this.Activity.get({userId:this.userId});
27+
$scope.activities = $scope.Activity.get({userId:this.userId});
2828
},
2929
expandReplies: function(activity) {
30-
activity.replies = this.Activity.replies({userId: this.userId, activityId: activity.id});
30+
activity.replies = $scope.Activity.replies({userId: this.userId, activityId: activity.id});
3131
}
3232
};
3333
</script>

docs/content/cookbook/deeplinking.ngdoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ In this example we have a simple app which consist of two screens:
3535
angular.module('deepLinking', ['ngSanitize'])
3636
.config(function($routeProvider) {
3737
$routeProvider.
38-
when("/welcome", {template:'welcome.html', controller:WelcomeCntl}).
39-
when("/settings", {template:'settings.html', controller:SettingsCntl});
38+
when("/welcome", {templateUrl:'welcome.html', controller:WelcomeCntl}).
39+
when("/settings", {templateUrl:'settings.html', controller:SettingsCntl});
4040
});
4141

4242
AppCntl.$inject = ['$scope', '$route']
@@ -141,11 +141,11 @@ In this example we have a simple app which consist of two screens:
141141
# Things to notice
142142

143143
* Routes are defined in the `AppCntl` class. The initialization of the controller causes the
144-
initialization of the {@link api/angular.module.ng.$route $route} service with the proper URL
144+
initialization of the {@link api/ng.$route $route} service with the proper URL
145145
routes.
146-
* The {@link api/angular.module.ng.$route $route} service then watches the URL and instantiates the
146+
* The {@link api/ng.$route $route} service then watches the URL and instantiates the
147147
appropriate controller when the URL changes.
148-
* The {@link api/angular.module.ng.$compileProvider.directive.ngView ngView} widget loads the
148+
* The {@link api/ng.directive:ngView ngView} widget loads the
149149
view when the URL changes. It also sets the view scope to the newly instantiated controller.
150150
* Changing the URL is sufficient to change the controller and view. It makes no difference whether
151151
the URL is changed programatically or by the user.

docs/content/cookbook/form.ngdoc

+8-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ allow a user to enter data.
1111
<doc:source>
1212
<script>
1313
function FormController($scope) {
14-
$scope.user = {
14+
var user = $scope.user = {
1515
name: 'John Smith',
1616
address:{line1: '123 Main St.', city:'Anytown', state:'AA', zip:'12345'},
1717
contacts:[{type:'phone', value:'1(234) 555-1212'}]
@@ -20,12 +20,12 @@ allow a user to enter data.
2020
$scope.zip = /^\d\d\d\d\d$/;
2121

2222
$scope.addContact = function() {
23-
$scope.user.contacts.push({type:'email', value:''});
23+
user.contacts.push({type:'email', value:''});
2424
};
2525

2626
$scope.removeContact = function(contact) {
27-
for (var i = 0, ii = this.user.contacts.length; i < ii; i++) {
28-
if (contact === this.user.contacts[i]) {
27+
for (var i = 0, ii = user.contacts.length; i < ii; i++) {
28+
if (contact === user.contacts[i]) {
2929
$scope.user.contacts.splice(i, 1);
3030
}
3131
}
@@ -102,14 +102,13 @@ allow a user to enter data.
102102

103103
# Things to notice
104104

105-
* The user data model is initialized {@link api/angular.module.ng.$compileProvider.directive.ngController controller} and is
106-
available in the {@link api/angular.module.ng.$rootScope.Scope scope} with the initial data.
105+
* The user data model is initialized {@link api/ng.directive:ngController controller} and is
106+
available in the {@link api/ng.$rootScope.Scope scope} with the initial data.
107107
* For debugging purposes we have included a debug view of the model to better understand what
108108
is going on.
109-
* The {@link api/angular.module.ng.$compileProvider.directive.input input directives} simply refer
109+
* The {@link api/ng.directive:input input directives} simply refer
110110
to the model and are data-bound.
111-
* The inputs {@link guide/dev_guide.forms validate}. (Try leaving them blank or entering non digits
112-
in the zip field)
111+
* The inputs validate. (Try leaving them blank or entering non digits in the zip field)
113112
* In your application you can simply read from or write to the model and the form will be updated.
114113
* By clicking the 'add' link you are adding new items into the `user.contacts` array which are then
115114
reflected in the view.

docs/content/cookbook/helloworld.ngdoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
Take a look through the source and note:
3030

31-
* The script tag that {@link guide/dev_guide.bootstrap bootstraps} the angular environment.
32-
* The text {@link api/angular.module.ng.$compileProvider.directive.input input widget} which is
31+
* The script tag that {@link guide/bootstrap bootstraps} the angular environment.
32+
* The text {@link api/ng.directive:input input form control} which is
3333
bound to the greeting name text.
3434
* No need for listener registration and event firing on change events.
35-
* The implicit presence of the `name` variable which is in the root {@link api/angular.module.ng.$rootScope.Scope scope}.
35+
* The implicit presence of the `name` variable which is in the root {@link api/ng.$rootScope.Scope scope}.
3636
* The double curly brace `{{markup}}`, which binds the name variable to the greeting text.
3737
* The concept of {@link guide/dev_guide.templates.databinding data binding}, which reflects any
3838
changes to the

docs/content/cookbook/index.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ allowing you to send links to specific screens in your app.
4444

4545
# Services
4646

47-
{@link api/angular.module.ng Services}: Services are long lived objects in your applications that are
47+
{@link api/ng Services}: Services are long lived objects in your applications that are
4848
available across controllers. A collection of useful services are pre-bundled with angular but you
4949
will likely add your own. Services are initialized using dependency injection, which resolves the
5050
order of initialization. This safeguards you from the perils of global state (a common way to

docs/content/cookbook/mvc.ngdoc

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ MVC allows for a clean an testable separation between the behavior (controller)
66
(HTML template). A Controller is just a JavaScript class which is grafted onto the scope of the
77
view. This makes it very easy for the controller and the view to share the model.
88

9-
The model is simply the controller's this. This makes it very easy to test the controller in
10-
isolation since one can simply instantiate the controller and test without a view, because there is
11-
no connection between the controller and the view.
9+
The model is a set of objects and primitives that are referenced from the Scope ($scope) object.
10+
This makes it very easy to test the controller in isolation since one can simply instantiate the
11+
controller and test without a view, because there is no connection between the controller and the
12+
view.
1213

1314

1415
<doc:example>
@@ -124,4 +125,4 @@ board variable.
124125
* The view can call any controller function.
125126
* In this example, the `setUrl()` and `readUrl()` functions copy the game state to/from the URL's
126127
hash so the browser's back button will undo game steps. See deep-linking. This example calls {@link
127-
api/angular.module.ng.$rootScope.Scope#$watch $watch()} to set up a listener that invokes `readUrl()` when needed.
128+
api/ng.$rootScope.Scope#$watch $watch()} to set up a listener that invokes `readUrl()` when needed.

0 commit comments

Comments
 (0)