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.

placeholder's dont work (need to use variable to bind)

See original GitHub issue

Using angular 1.5.1 and latest version of angular-chosen

tried defining the chosen select as so:

    ng-options=' for school in pageData.schools'
    data-placeholder="Pick one of these"

And the placeholder is not set to “Pick one of these”. I’ve also tried using placeholder-text-single and placeholder attributes and they also do not work (placeholder-text-single actually gives an error).

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

stringbeanscommented, Mar 18, 2016

@leocaseiro thanks for the speedy response! i looked at your plunkr and noticed that i’m setting the attribute wrong. instead of placeholder-text-single='hello there' it should be placeholder-text-single="'hello there'"

this was not reflected in the documentation and is possibly why i was confused. if you’re up for it i can do a pull request on your docs to update this.

btw, we are also a techstars company, so hi!

leocaseirocommented, Mar 18, 2016

Yeah! This because those string attributes emulating a scope type ‘@’ With that said, you could have a variable to bind on your placeholder:

$scope.customPlaceholder: 'My message';
<select chosen placeholder-text-single="customPlaceholder">...</select>

PR are always welcome. We use slate on docs branch.

Send me a PR there. That would be nice refer the egghead link.

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Binding and Defining
You can use placeholders for input variables in any DELETE , INSERT , SELECT , or ... If program variables do not contain...
Read more >
Cannot use variable interpolation for placeholder
I am using BonitaBPM 7.2 community edition. I have a text input and I wanted to use as a placeholder "Last available number:...
Read more >
How do I substitute values from the R session into SQL bind ...
I want to re-use raw SQL within an R script. However, SQL has variable binding that lets us parameterize the query.
Read more >
Don't Use The Placeholder Attribute - Smashing Magazine
Let's clarify why you need to stop using it. Introduced as part of the HTML5 specification, the placeholder attribute “represents a short hint ......
Read more >
Bind Function and Placeholders in C++ - GeeksforGeeks
From C++11 onwards, the introduction of the bind function has made this task easier. How does bind() work? Bind function with the help...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found