File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed 
modules/angular2/src/services Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 11import  { DOM }  from  'angular2/src/dom/dom_adapter' ; 
22
3+ /** 
4+  * A service that can be used to get and set the title of a current HTML document. 
5+  * 
6+  * Since an Angular 2 application can't be bootstrapped on the entire HTML document (`<html>` tag) 
7+  * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements 
8+  * (representing the `<title>` tag). Instead, this service can be used to set and get the current 
9+  * title value. 
10+  */ 
311export  class  Title  { 
12+   /** 
13+    * Get the title of the current HTML document. 
14+    * @returns  {string } 
15+    */ 
416  getTitle ( ) : string  {  return  DOM . getTitle ( ) ;  } 
517
18+   /** 
19+    * Set the title of the current HTML document. 
20+    * @param  newTitle 
21+    */ 
622  setTitle ( newTitle : string )  {  DOM . setTitle ( newTitle ) ;  } 
723} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments