Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
todomvc
Commits
6a65d06f
Commit
6a65d06f
authored
Nov 11, 2014
by
Pascal Hartig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AngularJS: Upgrade to 1.3.2
parent
b326cd3c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
671 additions
and
529 deletions
+671
-529
examples/angularjs/bower.json
examples/angularjs/bower.json
+3
-3
examples/angularjs/bower_components/angular-route/angular-route.js
...angularjs/bower_components/angular-route/angular-route.js
+17
-13
examples/angularjs/bower_components/angular/angular.js
examples/angularjs/bower_components/angular/angular.js
+651
-513
No files found.
examples/angularjs/bower.json
View file @
6a65d06f
...
@@ -2,11 +2,11 @@
...
@@ -2,11 +2,11 @@
"name"
:
"todomvc-angular"
,
"name"
:
"todomvc-angular"
,
"version"
:
"0.0.0"
,
"version"
:
"0.0.0"
,
"dependencies"
:
{
"dependencies"
:
{
"angular"
:
"1.3.
0
"
,
"angular"
:
"1.3.
2
"
,
"todomvc-common"
:
"~0.3.0"
"todomvc-common"
:
"~0.3.0"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"angular-mocks"
:
"1.3.
0
"
,
"angular-mocks"
:
"1.3.
2
"
,
"angular-route"
:
"1.3.
0
"
"angular-route"
:
"1.3.
2
"
}
}
}
}
examples/angularjs/bower_components/angular-route/angular-route.js
View file @
6a65d06f
/**
/**
* @license AngularJS v1.3.
0
* @license AngularJS v1.3.
2
* (c) 2010-2014 Google, Inc. http://angularjs.org
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
* License: MIT
*/
*/
...
@@ -39,7 +39,7 @@ var ngRouteModule = angular.module('ngRoute', ['ng']).
...
@@ -39,7 +39,7 @@ var ngRouteModule = angular.module('ngRoute', ['ng']).
* ## Dependencies
* ## Dependencies
* Requires the {@link ngRoute `ngRoute`} module to be installed.
* Requires the {@link ngRoute `ngRoute`} module to be installed.
*/
*/
function
$RouteProvider
(){
function
$RouteProvider
()
{
function
inherit
(
parent
,
extra
)
{
function
inherit
(
parent
,
extra
)
{
return
angular
.
extend
(
new
(
angular
.
extend
(
function
()
{},
{
prototype
:
parent
}))(),
extra
);
return
angular
.
extend
(
new
(
angular
.
extend
(
function
()
{},
{
prototype
:
parent
}))(),
extra
);
}
}
...
@@ -146,10 +146,14 @@ function $RouteProvider(){
...
@@ -146,10 +146,14 @@ function $RouteProvider(){
* Adds a new route definition to the `$route` service.
* Adds a new route definition to the `$route` service.
*/
*/
this
.
when
=
function
(
path
,
route
)
{
this
.
when
=
function
(
path
,
route
)
{
//copy original route object to preserve params inherited from proto chain
var
routeCopy
=
angular
.
copy
(
route
);
if
(
angular
.
isUndefined
(
routeCopy
.
reloadOnSearch
))
{
routeCopy
.
reloadOnSearch
=
true
;
}
routes
[
path
]
=
angular
.
extend
(
routes
[
path
]
=
angular
.
extend
(
{
reloadOnSearch
:
true
},
routeCopy
,
route
,
path
&&
pathRegExp
(
path
,
routeCopy
)
path
&&
pathRegExp
(
path
,
route
)
);
);
// create redirection for trailing slashes
// create redirection for trailing slashes
...
@@ -160,7 +164,7 @@ function $RouteProvider(){
...
@@ -160,7 +164,7 @@ function $RouteProvider(){
routes
[
redirectPath
]
=
angular
.
extend
(
routes
[
redirectPath
]
=
angular
.
extend
(
{
redirectTo
:
path
},
{
redirectTo
:
path
},
pathRegExp
(
redirectPath
,
route
)
pathRegExp
(
redirectPath
,
route
Copy
)
);
);
}
}
...
@@ -188,7 +192,7 @@ function $RouteProvider(){
...
@@ -188,7 +192,7 @@ function $RouteProvider(){
path
=
path
path
=
path
.
replace
(
/
([
().
])
/g
,
'
\\
$1
'
)
.
replace
(
/
([
().
])
/g
,
'
\\
$1
'
)
.
replace
(
/
(\/)?
:
(\w
+
)([\?\*])?
/g
,
function
(
_
,
slash
,
key
,
option
){
.
replace
(
/
(\/)?
:
(\w
+
)([\?\*])?
/g
,
function
(
_
,
slash
,
key
,
option
)
{
var
optional
=
option
===
'
?
'
?
option
:
null
;
var
optional
=
option
===
'
?
'
?
option
:
null
;
var
star
=
option
===
'
*
'
?
option
:
null
;
var
star
=
option
===
'
*
'
?
option
:
null
;
keys
.
push
({
name
:
key
,
optional
:
!!
optional
});
keys
.
push
({
name
:
key
,
optional
:
!!
optional
});
...
@@ -442,7 +446,7 @@ function $RouteProvider(){
...
@@ -442,7 +446,7 @@ function $RouteProvider(){
* {@link ng.$location $location} hasn't changed.
* {@link ng.$location $location} hasn't changed.
*
*
* As a result of that, {@link ngRoute.directive:ngView ngView}
* As a result of that, {@link ngRoute.directive:ngView ngView}
* creates new scope
,
reinstantiates the controller.
* creates new scope
and
reinstantiates the controller.
*/
*/
reload
:
function
()
{
reload
:
function
()
{
forceReload
=
true
;
forceReload
=
true
;
...
@@ -870,7 +874,7 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
...
@@ -870,7 +874,7 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
* Emitted every time the ngView content is reloaded.
* Emitted every time the ngView content is reloaded.
*/
*/
ngViewFactory
.
$inject
=
[
'
$route
'
,
'
$anchorScroll
'
,
'
$animate
'
];
ngViewFactory
.
$inject
=
[
'
$route
'
,
'
$anchorScroll
'
,
'
$animate
'
];
function
ngViewFactory
(
$route
,
$anchorScroll
,
$animate
)
{
function
ngViewFactory
(
$route
,
$anchorScroll
,
$animate
)
{
return
{
return
{
restrict
:
'
ECA
'
,
restrict
:
'
ECA
'
,
terminal
:
true
,
terminal
:
true
,
...
@@ -887,16 +891,16 @@ function ngViewFactory( $route, $anchorScroll, $animate) {
...
@@ -887,16 +891,16 @@ function ngViewFactory( $route, $anchorScroll, $animate) {
update
();
update
();
function
cleanupLastView
()
{
function
cleanupLastView
()
{
if
(
previousLeaveAnimation
)
{
if
(
previousLeaveAnimation
)
{
$animate
.
cancel
(
previousLeaveAnimation
);
$animate
.
cancel
(
previousLeaveAnimation
);
previousLeaveAnimation
=
null
;
previousLeaveAnimation
=
null
;
}
}
if
(
currentScope
)
{
if
(
currentScope
)
{
currentScope
.
$destroy
();
currentScope
.
$destroy
();
currentScope
=
null
;
currentScope
=
null
;
}
}
if
(
currentElement
)
{
if
(
currentElement
)
{
previousLeaveAnimation
=
$animate
.
leave
(
currentElement
);
previousLeaveAnimation
=
$animate
.
leave
(
currentElement
);
previousLeaveAnimation
.
then
(
function
()
{
previousLeaveAnimation
.
then
(
function
()
{
previousLeaveAnimation
=
null
;
previousLeaveAnimation
=
null
;
...
@@ -920,7 +924,7 @@ function ngViewFactory( $route, $anchorScroll, $animate) {
...
@@ -920,7 +924,7 @@ function ngViewFactory( $route, $anchorScroll, $animate) {
// function is called before linking the content, which would apply child
// function is called before linking the content, which would apply child
// directives to non existing elements.
// directives to non existing elements.
var
clone
=
$transclude
(
newScope
,
function
(
clone
)
{
var
clone
=
$transclude
(
newScope
,
function
(
clone
)
{
$animate
.
enter
(
clone
,
null
,
currentElement
||
$element
).
then
(
function
onNgViewEnter
()
{
$animate
.
enter
(
clone
,
null
,
currentElement
||
$element
).
then
(
function
onNgViewEnter
()
{
if
(
angular
.
isDefined
(
autoScrollExp
)
if
(
angular
.
isDefined
(
autoScrollExp
)
&&
(
!
autoScrollExp
||
scope
.
$eval
(
autoScrollExp
)))
{
&&
(
!
autoScrollExp
||
scope
.
$eval
(
autoScrollExp
)))
{
$anchorScroll
();
$anchorScroll
();
...
...
examples/angularjs/bower_components/angular/angular.js
View file @
6a65d06f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment