Answers.Body: <p>Short answer: add this to the top of your main angular html template:</p>
  
  <pre><code>&lt;h1 crm-page-title&gt;{{ts('Hello')}}&lt;/h1&gt;
  </code></pre>
  
  <p>More info:</p>
  
  <ul>
  <li>Documentation can be found in the <a href="https://github.com/civicrm/civicrm-core/blob/750c4bb5c5e5d101ad43c1352b6f1ab82752b5d4/ang/crmUi.js#L985" rel="nofollow">crmUi code</a>.</li>
  <li>This feature is in 4.7+ (although if you use it in 4.6 it won't crash - it just won't look as good).</li>
  <li>Note the support for setting document title seperately if you wish.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-29T21:48:33.153Z
Answers.LastActivityDate: 2015-11-29T21:48:33.153Z
Answers.UserDisplayName: Coleman
Body: <p>I have created an angular page and module and it does exactly what I wanted it to do. However the page title is CiviCRM and I want to change that.
  How do I do that?</p>
  
  <p>I have tried to set it in the javascript:</p>
  
  <pre><code>angular.module('myemma').config(function($routeProvider) {
    $routeProvider.when('/my-emma-accounts', {
      controller: 'MyemmaMyEmmaAccounts',
      templateUrl: '~/myemma/MyEmmaAccounts.html',
      title: 'MyEmma accounts',
  
      // If you need to look up data when opening the page, list it out
      // under "resolve".
      resolve: {
        accounts: function(crmApi) {
          return crmApi('MyEmmaAccount', 'get', {});
        }
      }
    });
  });
  </code></pre>
  
  <p>However the code above does not seem to work.</p>
  
Tags: <angular>
Title: How to set page title in an angular page?
ThreadText: # How to set page title in an angular page?
  
  (Asked by: username_0 on 2015-11-29)
  
  I have created an angular page and module and it does exactly what I wanted it to do. However the page title is CiviCRM and I want to change that.
  How do I do that?
  I have tried to set it in the javascript:
  angular.module('myemma').config(function($routeProvider) {
    $routeProvider.when('/my-emma-accounts', {
      controller: 'MyemmaMyEmmaAccounts',
      templateUrl: '~/myemma/MyEmmaAccounts.html',
      title: 'MyEmma accounts',
  
      // If you need to look up data when opening the page, list it out
      // under "resolve".
      resolve: {
        accounts: function(crmApi) {
          return crmApi('MyEmmaAccount', 'get', {});
        }
      }
    });
  });
  
  However the code above does not seem to work.
  
  **Tags:** angular
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-11-29. Score: 3
  
  Short answer: add this to the top of your main angular html template:
  {{ts('Hello')}}
  
  More info:
  
  Documentation can be found in the crmUi code.
  This feature is in 4.7+ (although if you use it in 4.6 it won't crash - it just won't look as good).
  Note the support for setting document title seperately if you wish.
  
  
  ---
  
  