首页 > 解决方案 > Angular 12, rendering dynamically routes in the page error

问题描述

I am trying to render dynamic routing in Angular but it gives an error. I want to render the pages according to the route link dynamically. have a look on a code: this is archive.component.ts code:

I want to do this: when user clicks on a link in a home component it takes them to the archive page and the heading there is rendered dynamically on which link user selected.

here are the pictures of it:

this is the error I am getting

I want to render route dynamically Like that Archive for/ 2021/01

标签: javascriptangular

解决方案


推荐阅读