小编Sai*_*idh的帖子

AngularJS数据绑定在ng-bind-html中?

是否可以将范围变量的数据绑定到即将绑定为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}}.

提前致谢..

angularjs ng-bind-html

19
推荐指数
3
解决办法
2万
查看次数

离子:在离子中使用anchorScroll时无法向上滚动

我们通过设置$location.hash(id)和使用离子应用程序中的scrollTo功能$anchorScroll().滚动到底部工作正常,但是一旦页面使用$anchorScroll和滚动到某个位置,我们就无法向上滚动页面$location.hash().

codepen中清楚地看到问题.单击" 到底部"按钮并尝试向上滚动.

请提供解决此滚动问题的解决方案.

angularjs ionic-framework

3
推荐指数
1
解决办法
2816
查看次数

标签 统计

angularjs ×2

ionic-framework ×1

ng-bind-html ×1