LP#1626157 Ang2 default page title
authorBill Erickson <berickxx@gmail.com>
Wed, 4 Apr 2018 17:21:33 +0000 (17:21 +0000)
committerBill Erickson <berickxx@gmail.com>
Wed, 4 Apr 2018 17:21:42 +0000 (17:21 +0000)
Override with ng2Title service since it works where the ang1
egString handler does not.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/staff/base.tt2

index 05c1624..386e4f1 100644 (file)
     </style>
     <!-- The page title changes with $rootScope.pageTitle, 
         defaulting to the static template page title. -->
-    <title ng-cloak>{{pageTitle || "[% ctx.page_title %]"}}</title>
+
+    [% IF ctx.is_ang2_app %]
+      <!-- 
+        ang1 title service does not function within ang2. 
+        Apply a default and let apps override via the ng2Title service.
+      -->
+      <title>[% ctx.page_title || l('Evergreen') %]</title>
+    [% ELSE %]
+      <title ng-cloak>{{pageTitle || "[% ctx.page_title %]"}}</title>
+    [% END %]
+
     <base href="/eg/staff/">
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">