Angular路由開發的一個實際例子

生成一個新的Component: 在NgModule文件app.module.ts裏,找到RouterModule.forRoot, 新增一條路由信息: 這條路由信息將url同Component ProductDetailsComponent關聯起來。 我們期望實現的效果是,用戶點擊產品列表時,跳轉到產品明細頁面去。因此,打開product-list Component的模板,在標籤a上增加路由信
相關文章
相關標籤/搜索