Currently, I am in the process of developing an Angular 9 application and have encountered two challenging issues.
Firstly, as I navigate through the routes using the navbar, I notice an error message in the console stating "Syntax error, unrecognized expression: /about". Despite this error, the route changes successfully. I have attempted various solutions to resolve this issue without success.
Error Message: Syntax error, unrecognized expression: /about
Secondly, on the landing page of my application, there is a section where the content of the h1 tag dynamically changes with the help of data attributes such as data-period and data-type. However, when I navigate away from the landing page and return, the h1 data array stops updating until I manually refresh the page. You can view the code snippets related to these issues in my Github repository. Below are excerpts from my code:
<nav class="navbar navbar-expand-lg navbar-light bg-light header-sticky">
<!-- Navbar Code Here -->
</nav>
Module.ts:
import { NgModule } from '@angular/core';
// Module Code Here
Landing Page HTML:
<div class="main-banner item-bg-one" id="home">
<!-- Landing Page HTML Code Here -->
</div>
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
// App Module Code Here
ClientModule.ts
import { NgModule } from '@angular/core';
// Client Module Code Here