javascript - Ember.js TypeError: parent is null -


i trying assign variable controller, set null, , display conditional template based on variable.

here's route definition:

app.indexroute = ember.route.extend({     setupcontroller: function(controller, model) {         this._super(controller, model);         controller.set('suggestion', null);     } }); 

and here's part of index.html:

<script type="text/x-handlebars" id="index">     {{log suggestion}}     {{#if suggestion}}         <p>there suggestion</p>     {{else}}         <p>no suggestion</p>     {{/if}} </script> 

however, above generates typeerror: parent null , nothing else happens. if remove conditional, works.

what's problem , error refer to? lastly, how can more context such errors?

i couldn't reproduce error -- ember version using?

http://jsbin.com/sodogufabe/2/edit?html,css,js,output

use built-in chrome developer console debugging errors, there's ember inspector extension chrome , firefox.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -