小编Pun*_*nit的帖子

SimpleChange和SimpleChanges之间的区别

在角度5 SimpleChangeSimpleChanges中有两个术语 ,我从官方文档中不清楚可以有人请解释我?? /

angular angular5

10
推荐指数
1
解决办法
6052
查看次数

角度5中的“刻度线”是什么意思

我在浏览组件交互部分时正在学习 Angular 5 我遇到了这部分

// Redefine `seconds()` to get from the `CountdownTimerComponent.seconds` ...
// but wait a tick first to avoid one-time devMode
// unidirectional-data-flow-violation error
setTimeout(() => this.seconds = () => this.timerComponent.seconds, 0);
Run Code Online (Sandbox Code Playgroud)

我浏览了文档,也在网上我试图找到没有关于这个主题的明确解释。有人可以解释一下吗

  1. 这是什么勾?
  2. 为什么我们需要它??
  3. 什么是单向数据流违规错误?
  4. settimeout 如何阻止它?
  5. 还有什么办法可以防止吗??

javascript angular

4
推荐指数
1
解决办法
1494
查看次数

在 ngx-bootstrap 中自定义选项卡

我正在尝试将自定义样式添加到 ngx-bootstrap 的选项卡中以获取角度。我想要两件事 1) 删除边框线和 2) 将背景颜色设置为活动选项卡。

但似乎没有任何效果

HTML代码

div >
<tabset>
   <tab customClass="customClass" heading="Home"></tab>
   <tab heading="Profile"></tab>
   <tab heading="About us"></tab>
</tabset>
</div>
Run Code Online (Sandbox Code Playgroud)

CSS 代码

.customClass > a{
background-color:silver !important;
border-bottom: none !important;
outline: 0 !important; 
}

tab>active{
color:rgb(58, 45, 128)
}
Run Code Online (Sandbox Code Playgroud)

什么可能是解决方案???

twitter-bootstrap-3 bootstrap-4 ngx-bootstrap angular

2
推荐指数
1
解决办法
8462
查看次数