是否可以在发布请求中超时3秒?怎么样 ?
我的代码目前
this.http.post('myUrl',
MyData, {headers: Myheaders})
.map(res => res.json())
.subscribe(
data => this.ret = data,
error => console.debug('ERROR', error),
() => console.log('END')
);
Run Code Online (Sandbox Code Playgroud) 我的路由器功能"导航"有问题,在我的AppComponent中我有:
@RouteConfig([
{path:'/home', name: 'Home', component: HomeComponent, useAsDefault: true, data: {user: null}},
{path:'/dashboard', name: 'Dashboard', component: DashboardComponent}
])
Run Code Online (Sandbox Code Playgroud)
在我的HomeComponent中,我试图这样做:
...
constructor(private _router:Router){}
changePage(){
this._router.parent.navigate(["Dashboard"]); // It fails
}
...
Run Code Online (Sandbox Code Playgroud)
它没有发送给'/ dashboard',这是正常的吗?
我的指令名为“ bgcolor”,其中包含以下内容:
export class BgColorDirective {
constructor(el: ElementRef) {
console.log(el.nativeElement.disabled); // show "false"
if (el.nativeElement.disabled) {
el.nativeElement.style.backgroundColor = '#5789D8';
el.nativeElement.style.color = '#FFFFFF';
}
}
Run Code Online (Sandbox Code Playgroud)
在我的模板中,我有:
<button (click)="submitData()" [disabled]="true" bgcolor [routerLink]="['Onboarding']"> </button>
Run Code Online (Sandbox Code Playgroud)
我不明白为什么会el.nativeElement.disabled回来false
您好,我在 django 导入导出方面遇到问题,
Django==1.8
django-import-export==1.1.0
Run Code Online (Sandbox Code Playgroud)
当我想导入一个小 csv(1 行)时,我直接有一个带有消息的空白页
尝试读取文件时遇到错误:XXX.csv
我在网络控制台中看到一个 POST 到http://localhost:8001/admin/XXX/XXX/import/ 并带有此消息的 200 响应。
无论模型如何,行为都是相同的。