我有一个Angular 2应用程序,其中包含一个登录组件,我希望其子域名为structure(list(id = c("X1", "X1", "X1", "X1", "X1", "X1", "X1",
"X1", "X1", "X1", "X1", "X1", "X1", "X1", "X1", "X1", "X1", "X1",
"X1", "X1", "X1", "X1", "X1", "X1", "X1", "X1", "X1", "X1", "X1",
"X1", "X2", "X2", "X2", "X2", "X2", "X2", "X2", "X2", "X2", "X2",
"X2", "X2", "X2", "X2", "X2", "X2", "X2", "X2", "X2", "X2", "X2",
"X2", "X2", "X2", "X2", "X2", "X2", "X2", "X2", "X2", "X3", "X3",
"X3", "X3", "X3", "X3", "X3", "X3", "X3", "X3", "X3", "X3", "X3",
"X3", "X3", "X3", "X3", "X3", "X3", "X3", "X3", "X3", "X3", "X3",
"X3", "X3", "X3", "X3", "X3", "X3", "X4", "X4", "X4", "X4", "X4",
"X4", "X4", "X4", "X4", "X4", "X4", "X4", "X4", "X4", "X4", "X4",
"X4", "X4", "X4", "X4", "X4", "X4", "X4", "X4", "X4", "X4", "X4",
"X4", "X4", "X4", "X5", "X5", "X5", "X5", "X5", "X5", "X5", "X5",
"X5", "X5", "X5", "X5", "X5", "X5", "X5", "X5", "X5", "X5", "X5",
"X5", "X5", "X5", "X5", "X5", "X5", "X5", "X5", "X5", "X5", "X5",
"X6", "X6", "X6", "X6", "X6", "X6", "X6", "X6", "X6", "X6", "X6",
"X6", "X6", "X6", "X6", "X6", "X6", "X6", "X6", "X6", "X6", "X6",
"X6", "X6", "X6", "X6", "X6", "X6", "X6", "X6", "Y", "Y", "Y",
"Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y",
"Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y",
"Y"), date = structure(c(17123L, 17130L, 17137L, 17144L, 17151L,
17158L, 17165L, 17172L, 17179L, 17186L, 17193L, 17200L, 17207L,
17214L, 17221L, 17228L, 17235L, 17242L, 17249L, 17256L, 17263L,
17270L, 17277L, 17284L, 17291L, 17298L, 17305L, 17312L, 17319L,
17326L, 17123L, 17130L, 17137L, 17144L, 17151L, 17158L, 17165L,
17172L, 17179L, 17186L, 17193L, 17200L, 17207L, 17214L, 17221L,
17228L, 17235L, 17242L, 17249L, 17256L, 17263L, 17270L, 17277L,
17284L, 17291L, 17298L, 17305L, 17312L, 17319L, 17326L, 17123L,
17130L, 17137L, 17144L, 17151L, 17158L, 17165L, 17172L, 17179L,
17186L, 17193L, 17200L, 17207L, 17214L, 17221L, 17228L, 17235L,
17242L, 17249L, 17256L, 17263L, 17270L, 17277L, 17284L, 17291L,
17298L, 17305L, 17312L, 17319L, 17326L, 17123L, 17130L, 17137L,
17144L, 17151L, 17158L, 17165L, 17172L, 17179L, 17186L, 17193L,
17200L, 17207L, 17214L, 17221L, 17228L, 17235L, 17242L, 17249L,
17256L, 17263L, 17270L, 17277L, 17284L, 17291L, 17298L, 17305L,
17312L, 17319L, 17326L, 17123L, 17130L, 17137L, 17144L, 17151L,
17158L, 17165L, 17172L, 17179L, 17186L, 17193L, 17200L, 17207L,
17214L, 17221L, 17228L, 17235L, 17242L, 17249L, 17256L, 17263L,
17270L, 17277L, 17284L, 17291L, 17298L, 17305L, 17312L, 17319L,
17326L, 17123L, 17130L, 17137L, 17144L, 17151L, 17158L, 17165L,
17172L, 17179L, 17186L, 17193L, 17200L, 17207L, 17214L, 17221L,
17228L, 17235L, 17242L, 17249L, 17256L, 17263L, 17270L, 17277L,
17284L, 17291L, 17298L, 17305L, 17312L, 17319L, 17326L, 17123L,
17130L, 17137L, 17144L, 17151L, 17158L, 17165L, 17172L, 17179L,
17186L, 17193L, 17200L, 17207L, 17214L, 17221L, 17228L, 17235L,
17242L, 17249L, 17256L, 17263L, 17270L, 17277L, 17284L, 17291L,
17298L, 17305L, 17312L, 17319L, 17326L), class = "Date"), PX_LAST = c(2.719,
2.761, 2.863, 2.815, 2.831, 2.872, 2.765, 2.681, 2.692, 2.783,
2.779, 2.795, 2.696, 2.803, 2.73, 2.807, 2.977, 2.861, 2.75,
2.701, 2.551, 2.474, 2.538, 2.575, 2.648, 2.635, 2.475, 2.41,
2.412, 2.373, 1.579, 1.56, 1.619, 1.73, 1.833, 1.796, 1.721,
1.731, 1.715, 1.751, 1.782, 1.766, 1.697, 1.711, 1.607, 1.702,
1.811, 1.761, 1.642, 1.625, 1.596, 1.494, 1.47, 1.547, 1.542,
1.571, 1.475, 1.445, 1.4, 1.413, 1.455, 1.417, 1.38, 1.453, 1.438,
1.345, 1.239, 1.383, 1.364, 1.431, 1.471, 1.352, 1.256, 1.211,
1.078, 1.185, 1.231, 1.244, 1.196, 1.139, 1.075, 1.043, 1.034,
1.085, 1.117, 1.086, 1.093, 1.012, 1.038, 1.02, 0.272, 0.24,
0.281, 0.365, 0.314, 0.221, 0.208, 0.298, 0.338, 0.421, 0.462,
0.412, 0.32, 0.302, 0.186, 0.356, 0.485, 0.435, 0.403, 0.328,
0.228, 0.187, 0.253, 0.317, 0.418, 0.391, 0.368, 0.331, 0.274,
0.268, 2.3548, 2.3572, 2.3831, 2.4675, 2.5916, 2.5373, 2.4443,
2.4193, 2.3964, 2.4668, 2.4843, 2.4648, 2.4073, 2.4147, 2.3117,
2.478, 2.5745, 2.5005, 2.4123, 2.3874, 2.3822, 2.2374, 2.248,
2.2802, 2.3487, 2.3257, 2.2346, 2.2465, 2.1591, 2.1538, 0.517,
0.534, 0.559, 0.611, 0.64, 0.615, 0.556, 0.628, 0.628, 0.699,
0.749, 0.71, 0.665, 0.678, 0.549, 0.694, 0.774, 0.75, 0.673,
0.605, 0.548, 0.516, 0.564, 0.587, 0.653, 0.572, 0.518, 0.514,
0.425, 0.43, 0.8906, 0.895, 0.8999, 0.9062, 0.89, 0.8864, 0.8802,
0.8839, 0.8964, 0.899, 0.9145, 0.9039, 0.9054, 0.9044, 0.8934,
0.8978, 0.9041, 0.9048, 0.8979, 0.9023, 0.892, 0.8842, 0.8942,
0.9107, 0.9121, 0.9163, 0.8944, 0.8965, 0.8995, 0.8965)), row.names = c(NA,
-210L), class = c("data.table", "data.frame"), .Names = c("id",
"date", "PX_LAST"), .internal.selfref = <pointer: 0x003c24a0>)
,然后是一个管理仪表板组件,我想成为login.mydomain.com
。如何使用Angular 2路由器实现这一目标?或者我应该采取不同的方法?
哦,我正在使用portal.mydomain.com
,我知道Angular-cli
命令。
答案 0 :(得分:1)
您在这里不需要任何配置。 这两个子域是不同的应用程序。 改用路由,例如example.com/#/login和/#/ portial。
但是如果您要使用两个不同的应用程序。只需将您的文件上传到您的子域的文件夹中即可。
Angular与您的子域无关。
但是,如果您要对其他应用example.com/login&example / partial(不包含子域)进行此类操作。
然后您需要在angular.json配置中设置基本href