akveo / akveo/ngx-admin

nb-select always empty

未关闭
#5,525 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
25.7k
派生
7.9k
PR 合并指标
30 天内没有已合并 PR

描述

### Issue type

**I'm submitting a ...** (check one with "x")

* [x] bug report

### Issue description

**Current behavior:**

I am trying setter a default value for the component nb-select but the field always stay empty on view html.

how to do this work?

html component

```

{{ municipioDefault.descricao }}
{{ municipioUnidade.descricao }}

```

Angular component
```
ngOnInit() {
this.router.params.subscribe(param => {
// tslint:disable-next-line: no-shadowed-variable
const id = param['id'];
this.municipioService.list().subscribe( municipios => this.municipioSelect = municipios);
this.unidadeHospitalarForm = this.createForm();
if (id) {
this.unidadeHospitalarService.getById(id).subscribe(data => {
this.unidadeHospitalarForm.patchValue(data);
this.municipioDefault = this.unidadeHospitalarForm.get('municipioUnidade').value;

}
```

### Other information:

**npm: 6.4.1 node: v10.15.3 , OS: Windows 10, Browser: Chrome**

```
"@agm/core": "^1.0.0-beta.5",
"@angular/animations": "^8.0.0",
"@angular/cdk": "^8.0.0",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/forms": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"@asymmetrik/ngx-leaflet": "3.0.1",
"@nebular/auth": "4.3.1",
"@nebular/eva-icons": "4.3.1",
"@nebular/security": "4.3.1",
"@nebular/theme": "4.3.1",

```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。