小编Arj*_*jun的帖子

路由在生产中不起作用

我正在Angular 2中开发一个Web应用程序,它在我的本地主机上可以正常工作,但是当我在生产环境中托管时,它的不起作用我的子域被替换为空字符串

我的生产服务器是 http:// foobar:8888 / Hrms

其中“ Hrms”是我托管“发布文件”的子域

当我在本地运行时,URL为:http:// localhost:50739 /#/ access / login ,在服务器中,子域自动丢失:http:// foobar:8888 /#/

我尝试HTTP:// foob​​ar的:8888 / HRMS /#/门禁/登录,但它仍然会HTTP:// foob​​ar的:8888 /#/自动

var domainName = "";
if (location.hostname !== "localhost")
    domainName = "HRMS/";

const appRoutes: Routes = [
{
    path: "access", component: AccessComponent,
    children: [
        { path: "", redirectTo: "login", pathMatch: "full" },
        { path: domainName + "login", component: LoginComponent, data: { title: "Login" }, canActivate: [UserGuard] },
        { path: …
Run Code Online (Sandbox Code Playgroud)

angular-routing angular

6
推荐指数
1
解决办法
5492
查看次数

AngularJS根据布尔值打印是或否

我从数据库到angularJs得到Bool值

<td>
    {{patient.Alcoholic}}
</td>
Run Code Online (Sandbox Code Playgroud)

而不是假或我需要打印是或否

<td>
    {{patient.Alcoholic // can i have if-else condition over here ??}}
</td>
Run Code Online (Sandbox Code Playgroud)

angularjs

4
推荐指数
2
解决办法
8510
查看次数

不等于字符串值在 postgreSQL 上不起作用

我写了一个非常简单的查询

select *, "Status" from "ABC" WHERE "ABCId" = 7; // Got 100 rows
Run Code Online (Sandbox Code Playgroud)

ABC 表有一些列,其中一列是“状态”,空值通常显示为 (Null)

当我尝试这些查询时

-- 1
select * FROM "ABC" where "ABCId" = 7 AND "Status" <> 'success'

-- 2
select * FROM "ABC" where "ABCId" = 7 AND "Status" != 'success'

-- 3
select * FROM "ABC" where "ABCId" = 7 AND "Status" NOT ILIKE '%success%'
Run Code Online (Sandbox Code Playgroud)

我没有得到任何行,我很头疼,这是一个简单的查询:/

postgresql

3
推荐指数
1
解决办法
7857
查看次数

标签 统计

angular ×1

angular-routing ×1

angularjs ×1

postgresql ×1