Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8991685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:47:09+00:00 2026-06-15T22:47:09+00:00

(edit: simplified things a bit below) I have a handlebars template with an {{#if

  • 0

(edit: simplified things a bit below)

I have a handlebars template with an {{#if etc}} conditional, and when I change the associated data the view updates the first time, but then does not continue to update on subsequent changes. I am toggling a boolean that is in the condition, and I know the toggle is running and switching the property because I can watch it do so on the console, but the actual view, a I said, only refreshes once. In my html file this looks like this:

<script type="text/x-handlebars" data-template-name="application">
<body>
<div class="row">
  {{#if App.Nav.show}}
     {{outlet nav}}
  {{/if}}
  <div class="span10">
     <h1>Hello</h1>
     {{outlet}}
  </div>
</div>
</body>
</script>

and a bit further on, to toggle:

<script type="text/x-handlebars" data-template-name="people">                                                                                                                                                
   <a {{action toggleMenu}}> toggle </a>
</script>

and in the javascript:

App.NavController = Ember.Controller.extend();
App.NavView = Ember.View.extend({
    templateName: 'nav'
});
App.Nav = Ember.Object.create({
    show: true
});

and finally the relevant bits of the router:

App.Router = Ember.Router.extend({
  enableLogging: true,
  root: Ember.Route.extend({
    index: Ember.Route.extend({
      route: '/',
        showPerson: Ember.Route.transitionTo('aName'),
        toggleMenu: function(){
           console.log('Changing the toggle!');
           App.Nav.toggleShow();
        },
        connectOutlets: function(router){
            router.get('applicationController').connectOutlet('nav', 'nav');
            router.get('applicationController').connectOutlet('allPeople', unrelated_function())
        }
    })
   })
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:47:11+00:00Added an answer on June 15, 2026 at 10:47 pm

    I did not use connectOutlet to display the view, let me know if there is some purpose behind using connectOutlet method, Meanwhile here is my implementation of toggling the view visibility

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: See my answer below--> I am wanting to have a view that when
[EDIT: Simplified question and code example I hope!] Hi. I need a bit of
Edit (updated question) I have a simple C program: // it is not important
**EDIT --- Trying an even more simplified version.... Still doesn't work... Returns $(this).closest is
EDIT 3: I am maintaining the original question below for historical reasons. However, I
I have an assignment where we need to write a (very simplified) multithreaded compression
Well, code speaks more (I have hard-coded some things, to isolate the problem and
[EDIT] Rephrased and Simplified whole post [/EDIT] In this blog , the following (I
This is a follow-up to my previous question. I've simplified things as much as
This is a simplified example. I have this enum declaration as follows: public enum

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.