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
Eugene Shen
todomvc
Commits
1de82da0
Commit
1de82da0
authored
Feb 09, 2015
by
Kostantinos Margaritis
Committed by
Sindre Sorhus
Feb 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close #1141 PR: Angularjs: Upgrade to NPM. Fixes #1110
parent
f79d2a8a
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
75 additions
and
52 deletions
+75
-52
examples/angularjs/.gitignore
examples/angularjs/.gitignore
+16
-0
examples/angularjs/bower.json
examples/angularjs/bower.json
+0
-13
examples/angularjs/bower_components/todomvc-common/bg.png
examples/angularjs/bower_components/todomvc-common/bg.png
+0
-0
examples/angularjs/index.html
examples/angularjs/index.html
+5
-5
examples/angularjs/node_modules/angular-route/angular-route.js
...les/angularjs/node_modules/angular-route/angular-route.js
+5
-11
examples/angularjs/node_modules/angular/angular.js
examples/angularjs/node_modules/angular/angular.js
+33
-19
examples/angularjs/node_modules/todomvc-app-css/index.css
examples/angularjs/node_modules/todomvc-app-css/index.css
+0
-0
examples/angularjs/node_modules/todomvc-common/base.css
examples/angularjs/node_modules/todomvc-common/base.css
+0
-0
examples/angularjs/node_modules/todomvc-common/base.js
examples/angularjs/node_modules/todomvc-common/base.js
+0
-0
examples/angularjs/package.json
examples/angularjs/package.json
+12
-0
examples/angularjs/test/config/karma.conf.js
examples/angularjs/test/config/karma.conf.js
+3
-3
examples/angularjs/test/package.json
examples/angularjs/test/package.json
+1
-1
No files found.
examples/angularjs/.gitignore
0 → 100644
View file @
1de82da0
node_modules
node_modules/angular/*
!node_modules/angular/angular.js
node_modules/angular-route/*
!node_modules/angular-route/angular-route.js
node_modules/angular-mocks/*
node_modules/todomvc-app-css/*
!node_modules/todomvc-app-css/index.css
node_modules/todomvc-common/*
!node_modules/todomvc-common/base.css
!node_modules/todomvc-common/base.js
examples/angularjs/bower.json
deleted
100644 → 0
View file @
f79d2a8a
{
"name"
:
"todomvc-angular"
,
"version"
:
"0.0.0"
,
"dependencies"
:
{
"angular"
:
"1.3.11"
,
"todomvc-common"
:
"~1.0.0"
,
"todomvc-app-css"
:
"~1.0.1"
},
"devDependencies"
:
{
"angular-mocks"
:
"1.3.11"
,
"angular-route"
:
"1.3.11"
}
}
examples/angularjs/bower_components/todomvc-common/bg.png
deleted
100644 → 0
View file @
f79d2a8a
2.08 KB
examples/angularjs/index.html
View file @
1de82da0
...
...
@@ -3,8 +3,8 @@
<head>
<meta
charset=
"utf-8"
>
<title>
AngularJS • TodoMVC
</title>
<link
rel=
"stylesheet"
href=
"
bower_component
s/todomvc-common/base.css"
>
<link
rel=
"stylesheet"
href=
"
bower_component
s/todomvc-app-css/index.css"
>
<link
rel=
"stylesheet"
href=
"
node_module
s/todomvc-common/base.css"
>
<link
rel=
"stylesheet"
href=
"
node_module
s/todomvc-app-css/index.css"
>
<style>
[
ng-cloak
]
{
display
:
none
;
}
</style>
</head>
<body
ng-app=
"todomvc"
>
...
...
@@ -63,9 +63,9 @@
<
p
>
Part
of
<
a
href
=
"
http://todomvc.com
"
>
TodoMVC
<
/a></
p
>
<
/footer
>
</script>
<script
src=
"
bower_component
s/todomvc-common/base.js"
></script>
<script
src=
"
bower_component
s/angular/angular.js"
></script>
<script
src=
"
bower_component
s/angular-route/angular-route.js"
></script>
<script
src=
"
node_module
s/todomvc-common/base.js"
></script>
<script
src=
"
node_module
s/angular/angular.js"
></script>
<script
src=
"
node_module
s/angular-route/angular-route.js"
></script>
<script
src=
"js/app.js"
></script>
<script
src=
"js/controllers/todoCtrl.js"
></script>
<script
src=
"js/services/todoStorage.js"
></script>
...
...
examples/angularjs/
bower_component
s/angular-route/angular-route.js
→
examples/angularjs/
node_module
s/angular-route/angular-route.js
View file @
1de82da0
/**
* @license AngularJS v1.3.1
1
* @license AngularJS v1.3.1
2
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
...
...
@@ -482,21 +482,15 @@ function $RouteProvider() {
* definitions will be interpolated into the location's path, while
* remaining properties will be treated as query params.
*
* @param {
Object
} newParams mapping of URL parameter names to values
* @param {
!Object<string, string>
} newParams mapping of URL parameter names to values
*/
updateParams
:
function
(
newParams
)
{
if
(
this
.
current
&&
this
.
current
.
$$route
)
{
var
searchParams
=
{},
self
=
this
;
angular
.
forEach
(
Object
.
keys
(
newParams
),
function
(
key
)
{
if
(
!
self
.
current
.
pathParams
[
key
])
searchParams
[
key
]
=
newParams
[
key
];
});
newParams
=
angular
.
extend
({},
this
.
current
.
params
,
newParams
);
$location
.
path
(
interpolate
(
this
.
current
.
$$route
.
originalPath
,
newParams
));
$location
.
search
(
angular
.
extend
({},
$location
.
search
(),
searchParams
));
}
else
{
// interpolate modifies newParams, only query params are left
$location
.
search
(
newParams
);
}
else
{
throw
$routeMinErr
(
'
norout
'
,
'
Tried updating route when with no current route
'
);
}
}
...
...
examples/angularjs/
bower_component
s/angular/angular.js
→
examples/angularjs/
node_module
s/angular/angular.js
View file @
1de82da0
/**
* @license AngularJS v1.3.1
1
* @license AngularJS v1.3.1
2
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
...
...
@@ -54,7 +54,7 @@ function minErr(module, ErrorConstructor) {
return
match
;
});
message
=
message
+
'
\n
http://errors.angularjs.org/1.3.1
1
/
'
+
message
=
message
+
'
\n
http://errors.angularjs.org/1.3.1
2
/
'
+
(
module
?
module
+
'
/
'
:
''
)
+
code
;
for
(
i
=
2
;
i
<
arguments
.
length
;
i
++
)
{
message
=
message
+
(
i
==
2
?
'
?
'
:
'
&
'
)
+
'
p
'
+
(
i
-
2
)
+
'
=
'
+
...
...
@@ -381,8 +381,7 @@ function nextUid() {
function
setHashKey
(
obj
,
h
)
{
if
(
h
)
{
obj
.
$$hashKey
=
h
;
}
else
{
}
else
{
delete
obj
.
$$hashKey
;
}
}
...
...
@@ -691,7 +690,7 @@ function isElement(node) {
function
makeMap
(
str
)
{
var
obj
=
{},
items
=
str
.
split
(
"
,
"
),
i
;
for
(
i
=
0
;
i
<
items
.
length
;
i
++
)
obj
[
items
[
i
]
]
=
true
;
obj
[
items
[
i
]
]
=
true
;
return
obj
;
}
...
...
@@ -1472,8 +1471,12 @@ function bootstrap(element, modules, config) {
forEach
(
extraModules
,
function
(
module
)
{
modules
.
push
(
module
);
});
doBootstrap
();
return
doBootstrap
();
};
if
(
isFunction
(
angular
.
resumeDeferredBootstrap
))
{
angular
.
resumeDeferredBootstrap
();
}
}
/**
...
...
@@ -2118,11 +2121,11 @@ function toDebugString(obj) {
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/
var
version
=
{
full
:
'
1.3.1
1
'
,
// all of these placeholder strings will be replaced by grunt's
full
:
'
1.3.1
2
'
,
// all of these placeholder strings will be replaced by grunt's
major
:
1
,
// package task
minor
:
3
,
dot
:
1
1
,
codeName
:
'
spiffy-manatee
'
dot
:
1
2
,
codeName
:
'
outlandish-knitting
'
};
...
...
@@ -4157,7 +4160,7 @@ function createInjector(modulesToLoad, strictDi) {
}
var
args
=
[],
$inject
=
annotate
(
fn
,
strictDi
,
serviceName
),
$inject
=
createInjector
.
$$
annotate
(
fn
,
strictDi
,
serviceName
),
length
,
i
,
key
;
...
...
@@ -4196,7 +4199,7 @@ function createInjector(modulesToLoad, strictDi) {
invoke
:
invoke
,
instantiate
:
instantiate
,
get
:
getService
,
annotate
:
annotate
,
annotate
:
createInjector
.
$$
annotate
,
has
:
function
(
name
)
{
return
providerCache
.
hasOwnProperty
(
name
+
providerSuffix
)
||
cache
.
hasOwnProperty
(
name
);
}
...
...
@@ -7870,8 +7873,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
afterTemplateChildLinkFn
,
beforeTemplateCompileNode
=
$compileNode
[
0
],
origAsyncDirective
=
directives
.
shift
(),
// The fact that we have to copy and patch the directive seems wrong!
derivedSyncDirective
=
extend
({},
origAsyncDirective
,
{
derivedSyncDirective
=
inherit
(
origAsyncDirective
,
{
templateUrl
:
null
,
transclude
:
null
,
replace
:
null
,
$
$originalDirective
:
origAsyncDirective
}),
templateUrl
=
(
isFunction
(
origAsyncDirective
.
templateUrl
))
...
...
@@ -8324,6 +8326,8 @@ function removeComments(jqNodes) {
return
jqNodes
;
}
var
$controllerMinErr
=
minErr
(
'
$controller
'
);
/**
* @ngdoc provider
* @name $controllerProvider
...
...
@@ -8411,7 +8415,12 @@ function $ControllerProvider() {
}
if
(
isString
(
expression
))
{
match
=
expression
.
match
(
CNTRL_REG
),
match
=
expression
.
match
(
CNTRL_REG
);
if
(
!
match
)
{
throw
$controllerMinErr
(
'
ctrlfmt
'
,
"
Badly formed controller string '{0}'.
"
+
"
Must match `__name__ as __id__` or `__name__`.
"
,
expression
);
}
constructor
=
match
[
1
],
identifier
=
identifier
||
match
[
3
];
expression
=
controllers
.
hasOwnProperty
(
constructor
)
...
...
@@ -12336,6 +12345,11 @@ Parser.prototype = {
?
fn
.
apply
(
context
,
args
)
:
fn
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
],
args
[
4
]);
if
(
args
)
{
// Free-up the memory (arguments of the last function call).
args
.
length
=
0
;
}
return
ensureSafeObject
(
v
,
expressionText
);
};
},
...
...
@@ -13207,8 +13221,7 @@ function qFactory(nextTick, exceptionHandler) {
'
qcycle
'
,
"
Expected promise to be resolved with value other than itself '{0}'
"
,
val
));
}
else
{
}
else
{
this
.
$$resolve
(
val
);
}
...
...
@@ -24551,10 +24564,11 @@ var NG_HIDE_IN_PROGRESS_CLASS = 'ng-hide-animate';
*
* By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change
* the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
* class in CSS:
* class CSS. Note that the selector that needs to be used is actually `.ng-hide:not(.ng-hide-animate)` to cope
* with extra animation classes that can be added.
*
* ```css
* .ng-hide {
* .ng-hide
:not(.ng-hide-animate)
{
* /* this is just another form of hiding an element */
* display: block!important;
* position: absolute;
...
...
@@ -26070,7 +26084,7 @@ var maxlengthDirective = function() {
ctrl
.
$validate
();
});
ctrl
.
$validators
.
maxlength
=
function
(
modelValue
,
viewValue
)
{
return
(
maxlength
<
0
)
||
ctrl
.
$isEmpty
(
model
Value
)
||
(
viewValue
.
length
<=
maxlength
);
return
(
maxlength
<
0
)
||
ctrl
.
$isEmpty
(
view
Value
)
||
(
viewValue
.
length
<=
maxlength
);
};
}
};
...
...
examples/angularjs/
bower_component
s/todomvc-app-css/index.css
→
examples/angularjs/
node_module
s/todomvc-app-css/index.css
View file @
1de82da0
File moved
examples/angularjs/
bower_component
s/todomvc-common/base.css
→
examples/angularjs/
node_module
s/todomvc-common/base.css
View file @
1de82da0
File moved
examples/angularjs/
bower_component
s/todomvc-common/base.js
→
examples/angularjs/
node_module
s/todomvc-common/base.js
View file @
1de82da0
File moved
examples/angularjs/package.json
0 → 100644
View file @
1de82da0
{
"private"
:
true
,
"dependencies"
:
{
"angular"
:
"^1.3.12"
,
"todomvc-common"
:
"^1.0.0"
,
"todomvc-app-css"
:
"^1.0.1"
},
"devDependencies"
:
{
"angular-mocks"
:
"^1.3.12"
,
"angular-route"
:
"^1.3.12"
}
}
examples/angularjs/test/config/karma.conf.js
View file @
1de82da0
...
...
@@ -5,9 +5,9 @@ module.exports = function (config) {
basePath
:
'
../../
'
,
frameworks
:
[
'
jasmine
'
],
files
:
[
'
bower_component
s/angular/angular.js
'
,
'
bower_component
s/angular-route/angular-route.js
'
,
'
bower_component
s/angular-mocks/angular-mocks.js
'
,
'
node_module
s/angular/angular.js
'
,
'
node_module
s/angular-route/angular-route.js
'
,
'
node_module
s/angular-mocks/angular-mocks.js
'
,
'
js/**/*.js
'
,
'
test/unit/**/*.js
'
],
...
...
examples/angularjs/test/package.json
View file @
1de82da0
...
...
@@ -4,7 +4,7 @@
"author"
:
"Pascal Hartig <phartig@rdrei.net>"
,
"version"
:
"1.0.0"
,
"devDependencies"
:
{
"karma"
:
"
~
0.10.0"
"karma"
:
"
^
0.10.0"
},
"scripts"
:
{
"test"
:
"karma start config/karma.conf.js"
...
...
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