是否可以将范围变量的数据绑定到即将绑定为ng-bind-html的html?
即,我有一个
html ="<div>{{caption}}</div>";
Run Code Online (Sandbox Code Playgroud)
和我的角模板看起来像,
<div ng-bind-html="html"></div>
Run Code Online (Sandbox Code Playgroud)
范围变量的值caption在角度控制器中设置.
所以,我想绑定数据{{caption}}.
提前致谢..
我们通过设置$location.hash(id)和使用离子应用程序中的scrollTo功能$anchorScroll().滚动到底部工作正常,但是一旦页面使用$anchorScroll和滚动到某个位置,我们就无法向上滚动页面$location.hash().
在codepen中清楚地看到问题.单击" 到底部"按钮并尝试向上滚动.
请提供解决此滚动问题的解决方案.