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
cbfa0c87
Commit
cbfa0c87
authored
Dec 22, 2015
by
Colin Eberhardt
Committed by
Sam Saccone
Jan 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use dependency injection
parent
60c55a87
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
7 deletions
+9
-7
examples/angular2/app/app.js
examples/angular2/app/app.js
+3
-3
examples/angular2/app/app.ts
examples/angular2/app/app.ts
+2
-2
examples/angular2/app/bootstrap.js
examples/angular2/app/bootstrap.js
+2
-1
examples/angular2/app/bootstrap.ts
examples/angular2/app/bootstrap.ts
+2
-1
No files found.
examples/angular2/app/app.js
View file @
cbfa0c87
...
...
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
var
core_1
=
require
(
'
angular2/core
'
);
var
store_1
=
require
(
'
./services/store
'
);
var
TodoApp
=
(
function
()
{
function
TodoApp
()
{
function
TodoApp
(
todoStore
)
{
this
.
newTodoText
=
''
;
this
.
todoStore
=
new
store_1
.
TodoStore
()
;
this
.
todoStore
=
todoStore
;
}
TodoApp
.
prototype
.
stopEditing
=
function
(
todo
,
editedTitle
)
{
todo
.
title
=
editedTitle
;
...
...
@@ -52,7 +52,7 @@ var TodoApp = (function () {
selector
:
'
todo-app
'
,
templateUrl
:
'
app/app.html
'
}),
__metadata
(
'
design:paramtypes
'
,
[])
__metadata
(
'
design:paramtypes
'
,
[
store_1
.
TodoStore
])
],
TodoApp
);
return
TodoApp
;
})();
...
...
examples/angular2/app/app.ts
View file @
cbfa0c87
...
...
@@ -9,8 +9,8 @@ export default class TodoApp {
todoStore
:
TodoStore
;
newTodoText
=
''
;
constructor
()
{
this
.
todoStore
=
new
TodoStore
()
;
constructor
(
todoStore
:
TodoStore
)
{
this
.
todoStore
=
todoStore
;
}
stopEditing
(
todo
:
Todo
,
editedTitle
:
string
)
{
...
...
examples/angular2/app/bootstrap.js
View file @
cbfa0c87
var
browser_1
=
require
(
'
angular2/platform/browser
'
);
var
app_1
=
require
(
'
./app
'
);
browser_1
.
bootstrap
(
app_1
.
default
);
var
store_1
=
require
(
'
./services/store
'
);
browser_1
.
bootstrap
(
app_1
.
default
,
[
store_1
.
TodoStore
]);
//# sourceMappingURL=bootstrap.js.map
\ No newline at end of file
examples/angular2/app/bootstrap.ts
View file @
cbfa0c87
import
{
bootstrap
}
from
'
angular2/platform/browser
'
;
import
TodoApp
from
'
./app
'
import
{
TodoStore
}
from
'
./services/store
'
;
bootstrap
(
TodoApp
);
bootstrap
(
TodoApp
,
[
TodoStore
]
);
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