Template local variables with dash (-) in them do not work
See original GitHub issueThat is, this works:
<input #newtodo>
<button (click)="addTodo(newtodo.domElement.value)">Add Todo</button>
But this does not:
<input #new-todo>
<button (click)="addTodo(new-todo.domElement.value)">Add Todo</button>
Nor does this:
<input #newTodo>
<button (click)="addTodo(newTodo.domElement.value)">Add Todo</button>
If it’s not actually supposed to work, we should warn when users do this.
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (12 by maintainers)
Top Results From Across the Web
Backbone Underscore Template not working dash in variable ...
1 Answer 1 ... Underscore templates work by converting your template to a JavaScript function. Things like <%= x %> go straight into...
Read more >Part 5. Sharing Data Between Callbacks - Dash Plotly
Global variables will break your Dash apps. However, there are other ways to share data between callbacks. This chapter is useful for callbacks...
Read more >Live template variables | IntelliJ IDEA Documentation - JetBrains
Configure template variables Specify variables in the template text and click Edit variables. In the Edit Template Variables dialog, you can ...
Read more >Using "${a:-b}" for variable assignment in scripts
This technique allows for a variable to be assigned a value if another variable is either empty or is undefined. NOTE: This "other...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mhevery maybe just mention that in docs somewhere? I have created value
newTodo
and it cost me bit of time to spot thatnewtodo
in browserThis issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.