You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that we have the individual ("lower order") functions render_main#51, render_item#52, and render_footer#53
for rendering the sections of the todo app,
we can write the view function to render the entire app!
With the main and footer "partial" views built, the overall view is rediculously simple:
To save on repetition, and illustrate just how simple the view is, this is the "HTML"
with the <section class"main"> and <footer class="footer"> partials replaced by invocations to the respective functions render_main#51 and render_footer#53:
<sectionclass="todoapp"><headerclass="header"><h1>todos</h1><inputclass="new-todo" placeholder="What needs to be done?" autofocus=""></header>
render_main(model)
render_footer(model)
</section>
Acceptance Criteria
View displays:
<h1> containing the title text "todos".
<input class="new-todo"> has placeholder text "What needs to be done?"
<ul class="todo-list"> list of todo items has zero items by default.
<footer> count is Zero when the app is first rendered with no todos in the model.
The text was updated successfully, but these errors were encountered:
Now that we have the individual ("lower order") functions
render_main
#51,render_item
#52, andrender_footer
#53for rendering the sections of the todo app,
we can write the
view
function to render the entire app!With the
main
andfooter
"partial" views built, the overallview
is rediculously simple:To save on repetition, and illustrate just how simple the
view
is, this is the "HTML"with the
<section class"main">
and<footer class="footer">
partials replaced by invocations to the respective functionsrender_main
#51 andrender_footer
#53:Acceptance Criteria
View displays:
<h1>
containing the title text "todos".<input class="new-todo">
has placeholder text "What needs to be done?"<ul class="todo-list">
list of todo items haszero
items by default.<footer>
count is Zero when the app is first rendered with no todos in themodel
.The text was updated successfully, but these errors were encountered: