AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Todolist template html1/7/2023 ![]() This tells the list to create a new TodoModel instance with the Creates a new todo item when the enter key is pressed in the new todo ![]() tells it to delete itself from localStorage as well. ![]() The TodoModel class extends Y.Model and customizes it to use a localStorage sync provider (the source for that is in the LocalStorageSync section below) and to provide attributes and methods useful for todo items.TodoModel = Y.TodoModel = Y.Base.create('todoModel', Y.Model,, to the todo model's `destroy()` method HTMLįirst we'll create the HTML shell for our todo app. I swear.įor a slightly more realistic use case demonstrating how the App Framework can make a complex task simpler instead of a simple task more complex, take a look at the GitHub Contributors example. Also, our lawyers advised us that we were legally required to provide a todo example, so we had no choice in the matter. In other words, this example is not meant to be a recommendation for how to implement a todo app it's meant to be a demonstration of how models and views fit together to define application logic. In reality, this little todo app is so conceptually simple that it probably doesn't need to be broken into discrete components, but its inherent conceptual simplicity makes it convenient for explaining how models, model lists, and views work. Ironically, this example complexifies a very simple application in order to demonstrate concepts you might actually use to simplify a complex application.
0 Comments
Read More
Leave a Reply. |