In the index.html within the "src" folder, I wrote {{ title }} like as follows:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ title }}</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<app-root></app-root>
</body>
</html>
In product.components.ts, I defined the title as "Products" as follows, but it wont works.
export class ProductComponent implements OnInit {
products: Product[] = [];
dataInvalid = false;
formErrors = [];
formSubmitting = false;
title = 'Products';
How can I change the title if users clicks on different pages?