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
e73d8496
Commit
e73d8496
authored
Jul 21, 2012
by
Stas SUȘCOV
Committed by
Sindre Sorhus
Jul 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ember app: Improved routing
parent
53e546e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
architecture-examples/emberjs/index.html
architecture-examples/emberjs/index.html
+3
-3
architecture-examples/emberjs/js/views/application.js
architecture-examples/emberjs/js/views/application.js
+10
-0
No files found.
architecture-examples/emberjs/index.html
View file @
e73d8496
...
...
@@ -34,13 +34,13 @@
<script
id=
"filtersTemplate"
type=
"text/x-handlebars"
>
<
ul
id
=
"
filters
"
>
<
li
>
<
a
{{
action
showAll
href
=
true
}}
>
All
<
/a
>
<
a
{{
action
showAll
href
=
true
}}
{{
bindAttr
class
=
"
view.isAll:selected
"
}}
>
All
<
/a
>
<
/li
>
<
li
>
<
a
{{
action
showActive
href
=
true
}}
>
Active
<
/a
>
<
a
{{
action
showActive
href
=
true
}}
{{
bindAttr
class
=
"
view.isActive:selected
"
}}
>
Active
<
/a
>
<
/li
>
<
li
>
<
a
{{
action
showCompleted
href
=
true
}}
>
Completed
<
/a
>
<
a
{{
action
showCompleted
href
=
true
}}
{{
bindAttr
class
=
"
view.isCompleted:selected
"
}}
>
Completed
<
/a
>
<
/li
>
<
/ul
>
</script>
...
...
architecture-examples/emberjs/js/views/application.js
View file @
e73d8496
...
...
@@ -58,6 +58,16 @@
}),
filtersView
:
Ember
.
View
.
create
({
templateName
:
'
filtersTemplate
'
,
filterBinding
:
'
controller.namespace.entriesController.filterBy
'
,
isAll
:
function
()
{
return
!!
Ember
.
empty
(
this
.
get
(
'
filter
'
)
);
}.
property
(
'
filter
'
),
isActive
:
function
()
{
return
!!
(
this
.
get
(
'
filter
'
)
===
'
active
'
);
}.
property
(
'
filter
'
),
isCompleted
:
function
()
{
return
!!
(
this
.
get
(
'
filter
'
)
===
'
completed
'
);
}.
property
(
'
filter
'
)
}),
clearBtnView
:
Ember
.
View
.
create
({
entriesBinding
:
'
controller.namespace.entriesController
'
,
...
...
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