title: Invoke a particular methods only once Angular JS
body: <p>I have following architecture on my angular application.</p>
  
  <p>Index Page-->Shell Page --> User view(From here User can we open subview)</p>
  
  <p>every route change on my application goes through Shell page. On shell page, I have a function called activate which should be invoked only when the application is called very first time.</p>
  
  <pre><code>//This function primarily displays a toaster saying the application is loaded.
  
       function activate() {
                  logger.success(config.appTitle + ' loaded!', null);
       }
  </code></pre>
  
  <p>Since routing chance goes through shell page, activate method is invoked even when it's moving from one view to the other view. I would like activate method to be invoked only very first time when the application is loaded not for route changes. </p>
  
  <p>How do I get this working? Thanks.</p>