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.

Simple data bind doesn't work in @next (disregard)

See original GitHub issue

Dead simple example data bind doesn’t work on standalone text. If I bind with attributes it works. For example:

var app = new Vue({
  el: '#app',
  data: {
    message: 'hello'
  }
})
<div id="app">
  <span>{{message}}</span>
  <textarea :value="message"></textarea>
</div>

The span does not show the message or anything at all. The textarea does show the correct value of the message. Am I missing something?

Issue Analytics

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

github_iconTop GitHub Comments

7reactions
rw3isscommented, Sep 24, 2016

Ah I think I know what’s happening… I think my server-side view preparation, written in handlebars, is stripping the Vue syntax! Duh! I noticed the client code in the browser source does not have the {{ message }}, but if I extract the code to a single .html page, it stays and shows the content as expected. Sorry for the confusion! Thanks for your help.

0reactions
chisumo2016commented, Jan 27, 2017

I am having the same issue . var todoApp = new Vue({ el:‘#app’, data: { displayTitle: true, displayAddTasks: true, displayTaskStatistics: true, displayTasks: true, displayProgressBar: true } });

Read more comments on GitHub >

github_iconTop Results From Across the Web

The data-bind syntax - Knockout.js
So if a binding doesn't appear to work, first check that the name is correct. Binding values. The binding value can be a...
Read more >
Is knockout.js ignoring disabled, or what could 'allow' <a> click ...
I have checked and knockout mechanism is working fine, it is removing manually added disabled ="disabled" attribute when model switches state ...
Read more >
Model Binding in ASP.NET Core | Microsoft Learn
This article explains what model binding is, how it works, and how to customize its behavior. What is Model binding.
Read more >
Layouts and binding expressions | Android Developers
Generated data binding code automatically checks for null values and avoid null pointer exceptions. For example, in the expression @{user.name} ...
Read more >
The 10 Most Common JavaScript Issues Developers Face
log` doesn't work as they expected. It is easy to have a shortcut for console.log, though: `log = console.log.bind(console)` Then you can use...
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