ember.js - Ember route with quotes deprecation warning -
i upgraded ember rc7. have bootstrap tabs map child routes using 'linkto' in following way:
{{#linkto page.tab1 href=false tagname=li}}{{#linkto page.tab1}}tab 1{{/linkto}}{{/linkto}} {{#linkto page.tab2 href=false tagname=li}}{{#linkto page.tab2}}tab 2{{/linkto}}{{/linkto}}
this has worked no problem until rc7. following warning:
debug: ------------------------------- ember.js:364 debug: ember.version : 1.0.0-rc.7 ember.js:364 debug: handlebars.version : 1.0.0 ember.js:364 debug: jquery.version : 1.9.1 ember.js:364 debug: ------------------------------- ember.js:364 render combined-scripts.js:995 deprecation: provided quoteless destination route parameter of page.tab1 linkto helper. soon, perform property lookup, rather treated string. rid of warning, wrap form.index in quotes. opt in new behavior, set env.helper_param_lookups = true @ null.<anonymous> (http://localhost:9001/bower_components/ember/ember.js:28036:15) @ object.anonymous (http://localhost:9001/scripts/compiled-templates.js:225:72) @ handlebars.vm.template (http://localhost:9001/bower_components/handlebars/handlebars.js:2212:33) @ ember.view.ember.coreview.extend.render (http://localhost:9001/bower_components/ember/ember.js:16826:16) @ ember.coreview.ember.object.extend._rendertobuffer (http://localhost:9001/bower_components/ember/ember.js:15767:10) @ ember.view.ember.coreview.extend._rendertobuffer (http://localhost:9001/bower_components/ember/ember.js:17406:23) @ superwrapper [as _rendertobuffer] (http://localhost:9001/bower_components/ember/ember.js:1082:16) @ null.<anonymous> (http://localhost:9001/bower_components/ember/ember.js:15748:19) @ object.ember.instrumentation.instrument (http://localhost:9001/bower_components/ember/ember.js:1465:20)
i tried putting page.tab1 & page.tab2 in quotes, links not work properly, it's if breaks 2 way binding. thoughts on how fix this?
update added jsbin example: notice click on 'next' button link urls not update new item, though name field does. i.e. click next button , url remain /item/1 though should /item/2
the issue unrelated use of quoting. problem you're having inner {{linkto}}
s don't match outer ones. in example providing second this
parameter {{linkto}}
in outer context not in inner one. in case this
controller, not model, causing problems. see http://jsbin.com/atazuy/29 working version.
Comments
Post a Comment