question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

amp-bind: TODO list use case

See original GitHub issue

@sebastianbenz suggested amp-bind support a use case like ToDoMVC. One way to accomplish this is to allow amp-mustache to template using amp-bind state.

This would be a cool addition, though I wonder if allowing Bind to add/remove DOM elements is too powerful. @ericlindley-g mentions that this is an app-like use case that hasn’t been prioritized yet.

/cc @cramforce

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
middle-way-approachcommented, Sep 30, 2018

I implemented a todo app with just amp-bind to show that it is possible. The only caveat is that the max number of todos is determined by the html structure and can not be dynamically increased. See yourself

1reaction
src-codecommented, Mar 15, 2017

I’d love to see this happen, especially for the commenting use case. Seems like it’d be really powerful to be able to update a small piece of state after a form submission, and then use that local state to re-render the template without requiring a re-fetch of the whole data set.

Read more comments on GitHub >

github_iconTop Results From Across the Web

amp-bind brings flexible interactivity to AMP pages
Sorting & filtering with server-side data is now possible through amp-list[src] binding. It uses amp-bind to coordinate events and actions ...
Read more >
amp-script: Interop with [on] actions · Issue #24763 - GitHub
Use cases : trigger an action in the backend that's not possible via amp-form; add a todo item to a todo list (this...
Read more >
AMP-EMAIL: Iterate list of items from amp-state - Stack Overflow
It's not possible to iterate an AMP state in that way. You have two options: Option 1. Use mustache templates instead.
Read more >
4 tricks for developing with the AMP framework
Now all that remains is to use that formLightboxTitle property inside our lightbox. To do this, the amp-bind component allows us to use...
Read more >
Support for Google AMP for Email in SparkPost Coming Soon
AMP for Email Use Cases · Verifying an email address · Acknowledging a security alert · Submitting an RSVP to an event ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found