我有一个奇怪的情况,即使在csproj中设置了以下设置:
<UseGlobalApplicationHostFile>True</UseGlobalApplicationHostFile>
Run Code Online (Sandbox Code Playgroud)
Visual Studio 2015仍在本地.vs目录(.vs\config\applicationhost.config)中创建站点,并忽略csproj中设置的标志.
我已经在另一个解决方案中工作了,它在添加GlobalApplicationHostFile键后使用(Documents\IISExpress\config)中的全局版本.
但是这个特定的解决方案(与其他解决方案相比相当陈旧)只是不想工作.我还比较了原始的csproj文件,但我看不出任何差异.
我还删除了所有*.suo文件以获得良好的衡量标准.
除了需要设置的使用全局应用程序主机文件之外还有其他设置吗?
谢谢你的帮助!:)
以下是我尝试基于Angular教程进行的工作。
export class DashboardComponent implements OnInit {
title = 'Current Robots';
private sobots: Robot[];
constructor(
private router: Router,
private sobotService: RobotService) {
}
getRobots() {
this.sobotService.getRobots().then(sobots => Array.prototype.push.apply(this.sobots, sobots.data));
}
ngOnInit() {
this.getRobots();
}
gotoDetail(sobot: Robot) {
let link = ['/detail', sobot.Id];
this.router.navigate(link);
}
Run Code Online (Sandbox Code Playgroud)
和看法
<h3>{{title}}</h3>
<div class="grid grid-pad">
<div *ngFor="let sobot of sobots" (click)="gotoDetail(sobot)" class="col-1-4">
<div class="module sobot">
<p>HostKey</p>
<h4>{{sobot.HostKey}}</h4>
</div>
</div>
</div>
<sobot-search></sobot-search>
Run Code Online (Sandbox Code Playgroud)
sobots.data看起来正在按预期返回数据对象-但是,直到我单击任何按钮/路由/任何事件后,它仍然没有更新。
控制台中未显示任何错误,我很困惑!
我继续尝试确保它只是将数据添加到原始数组对象中,但是这似乎还是行不通的!