In a non-CLI ember app, I have a viewHelper which used to work on an Ember.TextField using Handlebars.makeBoundHelper to change the input type to 'date' for mobile devices. Now with ember 1.10/HTMLBars I get an 'options.helperName is undefined' error. I try changing to 'HTMLBars.makeBoundHelper', and I see more properties within the method, but they're different from before. There was also an error about 'Handlebars.helpers.view.call' undefined, so I changed to 'Handlebars.helpers.view.helperFunction.call'. It appears that the function passed into makeBoundHelper is used as a callback, and the return at the end, a call to viewHelper(), serves to register it. But the call to viewHelper is a problem. With Handlebars.makeBoundHelper, I get the options.helperName error, even if I set it on the 'options' myself. With HTMLBars.makeBoundHelper, I get an error about viewHelper only accepts 1 param. I only reference one param in the callback, though the framework is actually passing in 4. Changing the number of args passed into the 'return helperFunction.call' doesn't make a difference.
Are bound viewHelpers in ember 1.10 still supported by the framework?
52 Views Asked by bobvan At
1
There are 1 best solutions below
Related Questions in EMBER.JS-VIEW
- How to optimize the rendering of components in Ember JS
- Not able to add data using ember-data Model
- redirect to external url in ember.js controller
- EmberJS: How to call a component function from a controller and calculate the component data
- EmberJS - how to restructure embedded models?
- Dynamic content loading view
- values from model are not updating to the view
- Ember JS: render same view twice ( with data from one controller )
- ember-cli: bind template action from view created using lookup
- ember.js have view's function observes controller's property
- Are bound viewHelpers in ember 1.10 still supported by the framework?
- Ember 1.10 - Upgrade Error - template must be a function. Did you mean to call Ember.Handlebars.compile("...") or specify templateName instead?
- Handling a click and a tap but not a scroll
- How to access view property from controller in emberjs
- Ember.js: how to get input element ID for use in label
Related Questions in HTMLBARS
- Bind more controller properties to one attribute using HTMLBars
- Ember.js dynamic components
- EmberJS - object proxying is deprecated - accessing property of a controller in template
- Ember Component Input Value not updating
- how to write nested if in ember htmlBars
- Resolving promise doesn't show data in template
- Loading data from JS object using Ember HTMLbars template
- Ember template helper get-value-with-key
- Add AND condition in Handlebars/HtmlBars template
- Is it possible to write conditional check for two variable in one conditional check
- Standalone HTMLBars runtime compiler
- Ember Component Integration Tests: `link-to` href empty
- Ember template - failed to execute 'createElement' on 'Document': The tag name provided is not a valid name
- Ember Apply JSON to Template in JavaScript
- How to stop the inner action from bubbling to the outer link-to helper?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I posted an issue on this at emberjs github, regarding how no approach or variation on syntax works. It appears that the API for viewHelper in HTMLBars is in complete, doesn't work and is not ready for prime time. Regardless, I dropped the date-input View and viewHelper and implemented a Component which I hope can & will accomplish the same functionality. So far it works in that it renders an input with a datepicker attached, and also renders the version for mobile devices. The only question remaining is if if will bind to the property in the Controller like the original version did.