खोज…


परिचय

आप पृष्ठ का शीर्षक कैसे बदल सकते हैं

वाक्य - विन्यास

  • setTitle(newTitle: string): void;
  • getTitle(): string;

पृष्ठ का शीर्षक बदल रहा है

  1. पहले हमें शीर्षक सेवा प्रदान करने की आवश्यकता है।
  2. SetTitle का उपयोग करना
import {Title} from "@angular/platform-browser"; 
@Component({
  selector: 'app',
  templateUrl: './app.component.html',
  providers : [Title]
})

export class AppComponent implements {
   constructor( private title: Title) { 
     this.title.setTitle('page title changed');
   }
}


Modified text is an extract of the original Stack Overflow Documentation
के तहत लाइसेंस प्राप्त है CC BY-SA 3.0
से संबद्ध नहीं है Stack Overflow