android - Nativescript Angular BottomNavigation selectedIndex 绑定不起作用
问题描述
我的带有 selectedIndex 绑定的 BottomNavigation 在加载时不起作用,没有显示内容但导航栏在那里。如果我正常插入索引,那么它将起作用。有人可以给我建议吗?谢谢
HTML:
<BottomNavigation [selectedIndex]="tabIndex"> <-- Not Working this way
<BottomNavigation selectedIndex="1"> <-- Works fine
TS:
export class MainComponent implements OnInit {
tabIndex: number = 2;
这是游乐场示例
解决方案
推荐阅读
- php - PHP 多种函数返回类型 String|int
- python - 将日期对象从用户输入传递到数据库(sqlalchemy)
- javafx - 当我已经在方法中抛出错误时出现未处理的异常错误
- html - `margin: 0 auto;` 和 `width:50%` 组合不会使我的 div 居中
- swift - Float32(Float 的别名)和 Float64(Double 的别名)有什么用?
- java - Maven插件的多个配置标签
- pagespeed - PageSpeed Insights 无法识别 WebP。格式
- laravel - 在 Eloquent 中使用第一个请求作为 where 子句的嵌套请求
- r - R:如何仅针对行的子集和条件向现有数据框添加新列
- openshift - 使用 openshift 和 unix 管道