Skip to content


Todos app does not work at #in-action chapter #225

pinksy opened this Issue · 1 comment

2 participants


Implementing the todos app as far as does not work:

Uncaught TypeError: Cannot call method 'replace' of undefined underscore-min.js:5
Uncaught TypeError: undefined is not a function

...because at that point in the tutorial, the #item-template and #stats-template templates have not been defined. Script tags (can be empty) to define the templates are needed in the <body> tag of index.html, anywhere before the view scripts are defined. E.g.,

<script src="js/collections/todos.js"></script>
<script type="text/template" id="item-template"></script>
<script type="text/template" id="stats-template"></script>
<script src="js/views/todo.js"></script>


I agree that we should address this. Originally I had wanted to just cover the most important parts of the codebase in the tutorial but it looks like a few pieces slipped in the process. We'll make sure to cover before the next release.

@addyosmani addyosmani added a commit that closed this issue
@addyosmani Fixes #225 5d0d49b
@raDiesle raDiesle added a commit that referenced this issue
@addyosmani Fixes #225 59f83b8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.