腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
使用
useHash
的
Angular
8
路由
:
true
angular
、
angular-router
目前,在我正在处理
的
项目中,
useHash
被设置为
true
,它工作得很好,因为它们都包含一个#,例如localhost:4200/my-app/#/page1。现在,我有一个需求,需要捕获这个没有#
的
特定URI,并将其指向一个组件。我试着为这个设置了一条路线,但它不起作用。{ path: 'pageWithoutHash', component: NewComponent, pathMatch: 'prefix' } 有没有一种方法可以匹配不
使用
浏览 34
提问于2021-08-23
得票数 1
1
回答
子文件夹中
的
Angular
路由
不起作用
angular
我正在一个子文件夹中部署一个
Angular
应用程序。登录页工作正常。但其他
路由
器无法正常工作。显示404错误。ng build --prod --base-href /demo/ ng build --prod --base-href /demo/ --deploy-url /demo/ 我已经托管了我
的
应用程序
浏览 7
提问于2019-05-15
得票数 1
回答已采纳
1
回答
在
angular
7中,
路由
URL不能像以前一样工作
angular
、
angular-ui-router
、
angular2-routing
、
angular7
、
query-parameters
路由
模块路径配置 { path: 'invite/:token', component: PreAuthComponent }, 以前我们
使用
的
是 localhost:4200/#/invite/?key=12345 但是在更新到
angular
7之后,它不会同时
使用
两个/?合并并且不能导航。如何
使用
上面提到
的
相同配置来实现这一点。当前正在
使用
不同配置
的
URL {
浏览 8
提问于2019-03-13
得票数 2
1
回答
使用
ui-router
的
Angular
4导航
angular
、
angular-ui-router
、
router
我正在升级到
angular
4。我目前正在
使用
带有导航状态
的
ui-router。我混合了
angular
1.x和所有新开发
的
angular
4。我希望我可以
使用
RouterModule.forRoot(appRoutes,{
useHash
:
true
,enableTracing:
true
})将新
路由
映射到旧
路由
。如何从新
的
angular
4组件
浏览 5
提问于2017-04-21
得票数 0
1
回答
监听
angular
应用程序
的
URL更改
javascript
、
angular
、
iframe
、
angular-routing
,
true
);不幸
的
是,我看不到console.log消息。
angular
应用程序(在iframe中)
使用
angular
路由
器在页面之间导航,代码如下:此外,
angular
应用程序在其RouterModule中
使用
useHash
:
true
RouterModule.fo
浏览 6
提问于2018-03-12
得票数 1
1
回答
页面刷新后,js文件更改路径角度
angular
、
.htaccess
、
nginx
我有一个角度
的
应用程序,一切都很好,直到我想重新加载页面。如果我重新加载该页面,js文件
的
路径就会改变。我
的
所有js文件都在根文件夹中,例如,如果我
的
页面是/contact/,则刷新后js文件
的
路径变为/contact/name.js。我
的
问题是如何编写一些htaccess内容,或者需要做哪些nginx设置才能解决这类问题。我尝试了很多与htacces相关
的
东西,但都没有成功。 谢谢,艾琳。
浏览 22
提问于2020-10-27
得票数 0
3
回答
无法通过URL访问角分量
html
、
angular
、
routing
我已经创建了一个角应用程序,它应该位于.NET-Application
的
顶部。有一个索引-ASP.NET
的
视图-应用程序,我应该从它调用一个特定
的
角度视图。为了进行测试,我尝试了
使用
http serve在本地托管应用程序--在这里,我只能访问index.html(在我
的
例子中,index.html没有条目)--一种像/users这样
的
通向用户
的
路径--概述将导致这是我
的
路由
模块: const routes: Routes =
浏览 4
提问于2019-10-31
得票数 2
回答已采纳
1
回答
Angular
useHash
=
true
,排除其中
的
特定
路由
angular
因此,我
的
app模块中有下面一行代码它为我
的
所有
路由
添加哈希,这对我来说很好。但是一些API正在尝试在特定
路由
上重定向到我
的
应用程序,并且它在末尾没有包括散列,因此我们可以想象它在以下
路由
上进行重定向但是由于有了
useHash
:
t
浏览 0
提问于2019-05-14
得票数 1
2
回答
在ng构建之后获得导航错误--在
angular
7中
的
prod
angular
我正在
使用
一个非常简单
的
angular
应用程序。 { component: SelectFrameworkComponent path: '
angular
-4-bootstrap-3', }这可以很好地工作,但
浏览 3
提问于2018-12-02
得票数 3
2
回答
angular
2
路由
,
useHash
分条
路由
参数
javascript
、
html
、
angular
、
angular2-routing
我正在开发一个简单
的
angular
2应用程序,
路由
似乎对我不起作用。当我尝试
使用
像myapp.com/15/hello这样
的
url为我
的
应用程序进行
路由
时,
使用
非散列
路由
保留url参数,代码如下 { path: '**', component: MyComponent },但是,当我移动到
useHash
路由
浏览 4
提问于2018-04-26
得票数 0
2
回答
生产环境中
的
Angular
重定向url
angular
当我让我
的
应用程序在生产环境中可用时,我遇到了一个问题。
路由
不工作生成404错误我需要在项目中进行哪些更改才能在此环境中工作
路由
?我
的
本地网站:http://localhost:4200/test 制作:http://my-app/test import { NgModule } from '@
angular
/core'; import{ RouterModule, Routes } from '@
浏览 24
提问于2021-10-15
得票数 0
2
回答
角度
路由
将url与特定参数匹配
javascript
、
php
、
angular
、
wordpress
我正在努力在WordPress管理仪表板中实现一个
angular
应用程序。 我目前正在尝试实现
路由
,我想知道是否有一种方法可以将
路由
与特定参数相匹配。page=
angular
_plugin 这与
angular
routing
的
根路径匹配。然而,如果我想实现更多
的
页面,我就不能
使用
不同
的
路径,因为WordPress不会识别它并返回一个错误。因此,为了避免WordPress干扰我
的
路由
,我需要
使
浏览 27
提问于2019-04-29
得票数 1
回答已采纳
2
回答
在Azure web应用程序中与标识服务器4签名回调重新调整404
的
角应用程序
angular
、
identityserver4
我
的
角度应用程序面临一个问题,它被部署到Azure中。下面是所做
的
和观察到
的
细节。这个应用程序在本地运行得很好,唯一
的
问题是在部署到Azure应用程序之后,甚至是在GoDaddy主机上。
使用
标识服务器4进行身份验证
的
角7应用程序。 您要查找
的
资源已被删除、名称更改或暂时不可用。 作为信息。我
的</e
浏览 6
提问于2021-10-26
得票数 0
1
回答
如何在
Angular
2 RC5中
使用
HashLocationStrategy进行引导
angular
、
typescript
我正在从
Angular
2 RC4升级到RC5import {enableProdMode} from '@
angular
/core';import { provideRouter } from '@
angular
/router'; import { XHRBackend } from '@
angular
p
浏览 1
提问于2016-08-16
得票数 19
回答已采纳
1
回答
Excel
Angular
Web加载项错误:无法匹配任何
路由
。URL段:'index.html‘
excel
、
angular
、
office-js
、
excel-addins
、
exceljs
在我
的
Excel
Angular
Web Add-In中,当导航到新
的
路由
时,我得到以下错误:但是,这些
路由
仍然有效。我该如何解决这个问题呢?
浏览 2
提问于2018-04-05
得票数 0
1
回答
我不想在主页中动态生成模块
angular
我是
angular
的
新手,问题是我有动态模块。当我运行我
的
项目时,所有的模块都会生成。但是我不想生成所有的模块,我只想生成我拥有的登录页面模块。import { Routes, RouterModule, PreloadAllModules } from '@
angular
/router';import { AddphyComponent
浏览 2
提问于2018-12-18
得票数 0
2
回答
原始例外:没有提供
路由
器!角2 RC5
javascript
、
angular
、
typescript
、
angular2-routing
不能
使用
this.router.navigate。这是我
的
: app.module.ts importcomponent: SearchComponent export const routing = RouterModule.forRoot(appRoutes, {
useHash
:
true
}); 最后,
浏览 4
提问于2016-09-07
得票数 1
回答已采纳
1
回答
如何在部署
angular
应用时避免
路由
更改?
angular
、
google-app-engine
、
google-cloud-platform
、
routing
当在本地运行我
的
Angular
应用程序时,我可以转到,例如localhost:4200/login。然而,当我部署我
的
Angular
应用程序时,当我访问Website.com/ /login时,我得到“请求
的
URL在此服务器上找不到”。我
的
应用程序被部署到Google Cloud应用程序引擎上。当我将"
useHash
:
true
“添加到我
的
RouterModule时。它工作得很好,所以websi
浏览 13
提问于2020-04-12
得票数 0
2
回答
Angular
2 /page无法加载资源:状态404
angular
、
typescript
、
routing
有趣
的
是,我可以转到这个页面,但当我按f12 (在控制台中)时,我得到这个错误:-> Failed to load resource: the server responded with a status404(Not Found) 这是我
的
简单代码。import 'reflect-metadata'import { Component, NgModule } from '@
angular
浏览 1
提问于2016-12-16
得票数 0
2
回答
如何在
angular
路由
器中关闭自动添加URL内部斜杠
angular
该应用程序也有一些旧
的
PHP部分,需要重新工作,所以我需要准确
的
网址如下所示。 和
angular
在.php后面添加一个斜杠
浏览 0
提问于2019-08-20
得票数 0
点击加载更多
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券