Skip to content

Commit 4eca90f

Browse files
author
Tero Keski-Valkama
committed
Updated angular to 1.3.x.
1 parent bc23cdd commit 4eca90f

22 files changed

Lines changed: 16610 additions & 7782 deletions

bower.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
"tests"
1313
],
1414
"dependencies": {
15-
"angular": "~1.2.0",
16-
"angular-cookies": "~1.2.0"
15+
"angular": "~1.3.0",
16+
"angular-cookies": "~1.3.0"
1717
},
1818
"devDependencies": {
19-
"angular-mocks": "~1.2.0"
19+
"angular-mocks": "~1.3.0"
2020
},
2121
"homepage": "https://github.com/agrublev/Angular-localStorage",
2222
"authors": [
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
22
"name": "angular-cookies",
3-
"version": "1.2.0-rc.2",
3+
"version": "1.3.8",
44
"main": "./angular-cookies.js",
5+
"ignore": [],
56
"dependencies": {
6-
"angular": "1.2.0-rc.2"
7+
"angular": "1.3.8"
78
},
89
"homepage": "https://github.com/angular/bower-angular-cookies",
9-
"_release": "1.2.0-rc.2",
10+
"_release": "1.3.8",
1011
"_resolution": {
1112
"type": "version",
12-
"tag": "v1.2.0-rc.2",
13-
"commit": "e00c891562539a9d8469cf7244e9390ea8679880"
13+
"tag": "v1.3.8",
14+
"commit": "9596f90e57ce1cd534fe3f0afdf3642aae343668"
1415
},
1516
"_source": "git://github.com/angular/bower-angular-cookies.git",
16-
"_target": "~1.2.0-rc.2",
17+
"_target": "~1.3.0",
1718
"_originalSource": "angular-cookies"
1819
}
Lines changed: 76 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,77 @@
1-
bower-angular-cookies
2-
=====================
1+
# packaged angular-cookies
32

4-
angular-cookies bower repo
3+
This repo is for distribution on `npm` and `bower`. The source for this module is in the
4+
[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngCookies).
5+
Please file issues and pull requests against that repo.
6+
7+
## Install
8+
9+
You can install this package either with `npm` or with `bower`.
10+
11+
### npm
12+
13+
```shell
14+
npm install angular-cookies
15+
```
16+
17+
Add a `<script>` to your `index.html`:
18+
19+
```html
20+
<script src="/node_modules/angular-cookies/angular-cookies.js"></script>
21+
```
22+
23+
Then add `ngCookies` as a dependency for your app:
24+
25+
```javascript
26+
angular.module('myApp', ['ngCookies']);
27+
```
28+
29+
Note that this package is not in CommonJS format, so doing `require('angular-cookies')` will
30+
return `undefined`.
31+
32+
### bower
33+
34+
```shell
35+
bower install angular-cookies
36+
```
37+
38+
Add a `<script>` to your `index.html`:
39+
40+
```html
41+
<script src="/bower_components/angular-cookies/angular-cookies.js"></script>
42+
```
43+
44+
Then add `ngCookies` as a dependency for your app:
45+
46+
```javascript
47+
angular.module('myApp', ['ngCookies']);
48+
```
49+
50+
## Documentation
51+
52+
Documentation is available on the
53+
[AngularJS docs site](http://docs.angularjs.org/api/ngCookies).
54+
55+
## License
56+
57+
The MIT License
58+
59+
Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
60+
61+
Permission is hereby granted, free of charge, to any person obtaining a copy
62+
of this software and associated documentation files (the "Software"), to deal
63+
in the Software without restriction, including without limitation the rights
64+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
65+
copies of the Software, and to permit persons to whom the Software is
66+
furnished to do so, subject to the following conditions:
67+
68+
The above copyright notice and this permission notice shall be included in
69+
all copies or substantial portions of the Software.
70+
71+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
72+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
73+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
74+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
75+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
76+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
77+
THE SOFTWARE.

components/angular-cookies/angular-cookies.js

100755100644
Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/**
2-
* @license AngularJS v1.2.0-rc.2
3-
* (c) 2010-2012 Google, Inc. http://angularjs.org
2+
* @license AngularJS v1.3.8
3+
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
66
(function(window, angular, undefined) {'use strict';
77

88
/**
9-
* @ngdoc overview
9+
* @ngdoc module
1010
* @name ngCookies
1111
* @description
1212
*
1313
* # ngCookies
1414
*
15-
* Provides the {@link ngCookies.$cookies `$cookies`} and
16-
* {@link ngCookies.$cookieStore `$cookieStore`} services.
15+
* The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.
1716
*
18-
* {@installModule cookies}
17+
*
18+
* <div doc-module-components="ngCookies"></div>
1919
*
2020
* See {@link ngCookies.$cookies `$cookies`} and
2121
* {@link ngCookies.$cookieStore `$cookieStore`} for usage.
@@ -24,33 +24,31 @@
2424

2525
angular.module('ngCookies', ['ng']).
2626
/**
27-
* @ngdoc object
28-
* @name ngCookies.$cookies
29-
* @requires $browser
27+
* @ngdoc service
28+
* @name $cookies
3029
*
3130
* @description
3231
* Provides read/write access to browser's cookies.
3332
*
34-
* Only a simple Object is exposed and by adding or removing properties to/from
35-
* this object, new cookies are created/deleted at the end of current $eval.
33+
* Only a simple Object is exposed and by adding or removing properties to/from this object, new
34+
* cookies are created/deleted at the end of current $eval.
35+
* The object's properties can only be strings.
3636
*
3737
* Requires the {@link ngCookies `ngCookies`} module to be installed.
3838
*
3939
* @example
40-
<doc:example>
41-
<doc:source>
42-
<script>
43-
function ExampleController($cookies) {
44-
// Retrieving a cookie
45-
var favoriteCookie = $cookies.myFavorite;
46-
// Setting a cookie
47-
$cookies.myFavorite = 'oatmeal';
48-
}
49-
</script>
50-
</doc:source>
51-
</doc:example>
40+
*
41+
* ```js
42+
* angular.module('cookiesExample', ['ngCookies'])
43+
* .controller('ExampleController', ['$cookies', function($cookies) {
44+
* // Retrieving a cookie
45+
* var favoriteCookie = $cookies.myFavorite;
46+
* // Setting a cookie
47+
* $cookies.myFavorite = 'oatmeal';
48+
* }]);
49+
* ```
5250
*/
53-
factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
51+
factory('$cookies', ['$rootScope', '$browser', function($rootScope, $browser) {
5452
var cookies = {},
5553
lastCookies = {},
5654
lastBrowserCookies,
@@ -80,7 +78,8 @@ angular.module('ngCookies', ['ng']).
8078

8179

8280
/**
83-
* Pushes all the cookies from the service to the browser and verifies if all cookies were stored.
81+
* Pushes all the cookies from the service to the browser and verifies if all cookies were
82+
* stored.
8483
*/
8584
function push() {
8685
var name,
@@ -96,22 +95,20 @@ angular.module('ngCookies', ['ng']).
9695
}
9796

9897
//update all cookies updated in $cookies
99-
for(name in cookies) {
98+
for (name in cookies) {
10099
value = cookies[name];
101100
if (!angular.isString(value)) {
102-
if (angular.isDefined(lastCookies[name])) {
103-
cookies[name] = lastCookies[name];
104-
} else {
105-
delete cookies[name];
106-
}
107-
} else if (value !== lastCookies[name]) {
101+
value = '' + value;
102+
cookies[name] = value;
103+
}
104+
if (value !== lastCookies[name]) {
108105
$browser.cookies(name, value);
109106
updated = true;
110107
}
111108
}
112109

113110
//verify what was actually stored
114-
if (updated){
111+
if (updated) {
115112
updated = false;
116113
browserCookies = $browser.cookies();
117114

@@ -132,8 +129,8 @@ angular.module('ngCookies', ['ng']).
132129

133130

134131
/**
135-
* @ngdoc object
136-
* @name ngCookies.$cookieStore
132+
* @ngdoc service
133+
* @name $cookieStore
137134
* @requires $cookies
138135
*
139136
* @description
@@ -144,14 +141,25 @@ angular.module('ngCookies', ['ng']).
144141
* Requires the {@link ngCookies `ngCookies`} module to be installed.
145142
*
146143
* @example
144+
*
145+
* ```js
146+
* angular.module('cookieStoreExample', ['ngCookies'])
147+
* .controller('ExampleController', ['$cookieStore', function($cookieStore) {
148+
* // Put cookie
149+
* $cookieStore.put('myFavorite','oatmeal');
150+
* // Get cookie
151+
* var favoriteCookie = $cookieStore.get('myFavorite');
152+
* // Removing a cookie
153+
* $cookieStore.remove('myFavorite');
154+
* }]);
155+
* ```
147156
*/
148157
factory('$cookieStore', ['$cookies', function($cookies) {
149158

150159
return {
151160
/**
152161
* @ngdoc method
153-
* @name ngCookies.$cookieStore#get
154-
* @methodOf ngCookies.$cookieStore
162+
* @name $cookieStore#get
155163
*
156164
* @description
157165
* Returns the value of given cookie key
@@ -166,8 +174,7 @@ angular.module('ngCookies', ['ng']).
166174

167175
/**
168176
* @ngdoc method
169-
* @name ngCookies.$cookieStore#put
170-
* @methodOf ngCookies.$cookieStore
177+
* @name $cookieStore#put
171178
*
172179
* @description
173180
* Sets a value for given cookie key
@@ -181,8 +188,7 @@ angular.module('ngCookies', ['ng']).
181188

182189
/**
183190
* @ngdoc method
184-
* @name ngCookies.$cookieStore#remove
185-
* @methodOf ngCookies.$cookieStore
191+
* @name $cookieStore#remove
186192
*
187193
* @description
188194
* Remove given cookie

components/angular-cookies/angular-cookies.min.js

100755100644
Lines changed: 5 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/angular-cookies/angular-cookies.min.js.map

100755100644
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "angular-cookies",
3-
"version": "1.2.0-rc.2",
3+
"version": "1.3.8",
44
"main": "./angular-cookies.js",
5+
"ignore": [],
56
"dependencies": {
6-
"angular": "1.2.0-rc.2"
7+
"angular": "1.3.8"
78
}
89
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "angular-cookies",
3+
"version": "1.3.8",
4+
"description": "AngularJS module for cookies",
5+
"main": "angular-cookies.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/angular/angular.js.git"
12+
},
13+
"keywords": [
14+
"angular",
15+
"framework",
16+
"browser",
17+
"cookies",
18+
"client-side"
19+
],
20+
"author": "Angular Core Team <[email protected]>",
21+
"license": "MIT",
22+
"bugs": {
23+
"url": "https://github.com/angular/angular.js/issues"
24+
},
25+
"homepage": "http://angularjs.org"
26+
}
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
22
"name": "angular-mocks",
3-
"version": "1.2.0-rc.2",
3+
"version": "1.3.8",
44
"main": "./angular-mocks.js",
5+
"ignore": [],
56
"dependencies": {
6-
"angular": "1.2.0-rc.2"
7+
"angular": "1.3.8"
78
},
89
"homepage": "https://github.com/angular/bower-angular-mocks",
9-
"_release": "1.2.0-rc.2",
10+
"_release": "1.3.8",
1011
"_resolution": {
1112
"type": "version",
12-
"tag": "v1.2.0-rc.2",
13-
"commit": "9bdf39463a7e59c35f4f6163853c8da4fbf81ea3"
13+
"tag": "v1.3.8",
14+
"commit": "c2baaee15ed497aff4c03fcae83ff5e9d3fa5878"
1415
},
1516
"_source": "git://github.com/angular/bower-angular-mocks.git",
16-
"_target": "~1.2.0-rc.2",
17+
"_target": "~1.3.0",
1718
"_originalSource": "angular-mocks"
1819
}

0 commit comments

Comments
 (0)