小编Dav*_*oal的帖子

在儿童路线Angular 2之间导航

我似乎无法在子路线之间导航.

路由器概述:

path: 'parent', component: parentComponent,
        children: [
            { path: '', redirectTo: 'child1', pathMatch: 'full' },
            { path: 'child1', component: child1Component },
            { path: 'child2', component: child2Component },
            { path: 'new/:type', component: child3Component },

            { path: '**', component: PageNotFoundComponent }
        ]
Run Code Online (Sandbox Code Playgroud)

我在child1组件中尝试导航到新的/类型路由,如下所示:

this._router.navigate(['new', objType], { relativeTo: this._route });
Run Code Online (Sandbox Code Playgroud)

但我一直得到错误:无法匹配任何路线.网址细分:'新/资产'.

如果我手动插入网址,它工作正常.

非常感谢帮助,谢谢!

url-redirection angular

11
推荐指数
2
解决办法
1万
查看次数

Angular 2不导入Bootstrap css

直接来自https://angular.io/docs/ts/latest/guide/forms.html

我们来添加样式表.

在应用程序根文件夹中打开终端窗口并输入命令:

npm install bootstrap --save

打开index.html并将以下链接添加到头部.

link rel ="stylesheet"href ="node_modules/bootstrap/dist/css/bootstrap.min.css">

但是,我一直得到404

GET http:// localhost:4200/node_modules/bootstrap/dist/css/bootstrap.min.css

它在我添加带有在线地址的脚本时有效,但为什么angular无法找到我文件的路径?

twitter-bootstrap angular

7
推荐指数
2
解决办法
1万
查看次数

如何将自定义文本添加到primeng paginator

我想知道你是否可以将自定义文本添加到paginator行,更具体地说,我希望它能够在右边的表中获得总点击量.

pagination primeng angular

7
推荐指数
2
解决办法
1万
查看次数