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 9108511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:49:33+00:00 2026-06-17T02:49:33+00:00

Hey all I’m trying to get a feel for angular and have ran into

  • 0

Hey all I’m trying to get a feel for angular and have ran into a little snag.

I have a container structure like the following:

<div class="main-container" ng-view>
    <!-- The below divs are constantly being 
         reloaded based on the current URL and it's associated view -->
    <div class="left-col">
    </div>
    <div class="right-col">
    </div>
</div>

Before I implemented Angular I just had a simple script that would check the height of the window and set the height of the left column and right column divs accordingly.

With angular there is probably a better way to do this then attaching an event function to the window object. Basically I want to fire a function everytime a new view is rendered but not duplicate the below code in all of my angular controllers like so:

$scope.$on('$viewContentLoaded', setColumnHeight);

Any help would be appreciated. Thanks!

  • 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-17T02:49:34+00:00Added an answer on June 17, 2026 at 2:49 am

    I’ve solved this problem in my app by having a root “Application Controller” at the top of the DOM tree. For example:

    <body ng-controller='applicationController'>
    ...
    <div class="ng-view"></div>
    ...
    </body>
    

    applicationController is always there, and can set up bindings on its scope when it is created.

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

Sidebar

Related Questions

Hey All, I currently use Google's API to include jQuery into my sites like
Hey all i have a JSFiddle that i have been working on with trying
Hey all i have an XML file that i am trying to loop though.
Hey all. Ive got a headache trying to get my head around this. I
Hey all i am trying my best to get the follow query: SELECT Client,
Hey all I have a large html string like <a style=background: rgb(100, 101, 43)
Hey all i have created dynamic buttons at runtime and i would like to
hey all, i have a question about urlmapping in grails. I'm trying to make
Hey all, I basically output content into a div like this using jquery: var
Hey all trying to play with nodejs MVC using express and mongoose. I have

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.