与NG-如果角度变化方向 [英] Angular change direction with ng-if
本文介绍了与NG-如果角度变化方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从RTL改变方向点击LTR。
I want to change direction from rtl to ltr by click .
<link href="~/App/Common/Style/Common/common.css" ng-if="!mustCahnge" rel="stylesheet" />
<link href="~/App/Common/Style/Common/common-ltr.css" ng-if="mustCahnge" rel="stylesheet" />
和 setting.html
<input class="" id="dir" type="checkbox" ng-model="mustCahnge">
但它不工作!结果
我这么想吗?
but it's not working !
am i missing something ?
推荐答案
据按预期工作。
确保
It is working as expected. make sure
<link href="~/App/Common/Style/Common/common.css" ng-if="!mustCahnge" rel="stylesheet" />
<link href="~/App/Common/Style/Common/common-ltr.css" ng-if="mustCahnge" rel="stylesheet" />
以上code是控制器内部present。
above code is present inside the controller.
这篇关于与NG-如果角度变化方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文