ember-one-way-controls | Native one way input | Addon library
kandi X-RAY | ember-one-way-controls Summary
kandi X-RAY | ember-one-way-controls Summary
Native one way input
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ember-one-way-controls
ember-one-way-controls Key Features
ember-one-way-controls Examples and Code Snippets
Community Discussions
Trending Discussions on ember-one-way-controls
QUESTION
Ember's default {{input}}
helper creates a two-way binding. What's the state-of-the-art way to create an input element that is only one-way bound?
A Google search for "ember one-way input" yields several add-ons:
- https://github.com/DockYard/ember-one-way-controls
- https://www.npmjs.com/package/ember-one-way-input
but do I need an add-on?
...ANSWER
Answered 2017-May-24 at 04:29I belive you can achieve this with the help of oneWay()
helper. Check the following link.
https://www.emberjs.com/api/classes/Ember.Binding.html#toc_one-way-bindings https://guides.emberjs.com/v2.13.0/object-model/bindings/#toc_one-way-bindings
Sample code from ember guides,
QUESTION
I have a project setup like in the following Twiddle
https://ember-twiddle.com/9b8b42ac659f746370576ed8fde64630
I'm trying to pass the language.code
to the language
queryParam for each selected language. In the actual project I'm using https://github.com/DockYard/ember-one-way-controls and I've managed to do this with an action bound to the input but on the page refresh the checkboxes values won't stick.
Is there a way to achieve this?
...ANSWER
Answered 2017-Jan-19 at 18:20Well, your problem is that you can't bind queryParams
to computed properties. So you can't to this in a nice way when using databindings, but when you go for DDAU, one way controls and closure actions its really easy.
By the way, you don't need ember-one-way-controls
. Ember can now handle most of this by its own.
So your solution.
First you need to bind your queryParams
to an array, because you want to store a list of values:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ember-one-way-controls
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page