随笔分类 -  Angular css

摘要:ng-style="{设置样式的条件?‘条件成立时的样式’:‘条件不成立时的样式’}" 例如: ng-style="{color:a>b?red:blue}" 当a>b时颜色为红色;当a<b或a=b;条件不成立时,颜色为蓝色 ng-class="{'条件为true时的class样式':条件=true,'条件为false时的class样式':条件=false}" true和false不是绝对... 阅读全文
posted @ 2017-11-07 16:22 芒果加冰 阅读(471) 评论(0) 推荐(0)
摘要:ng-sortable拖拽拉取效果demo地址:https://github.com/a5hik/ng-sortable 引入相关的js代码:bower install ng-sortable -save 引入js,引入css样式; 引用module; html代码: 阅读全文
posted @ 2017-09-14 21:06 芒果加冰 阅读(1521) 评论(0) 推荐(0)
摘要:选中时状态: 阅读全文
posted @ 2017-09-14 20:30 芒果加冰 阅读(250) 评论(0) 推荐(0)
摘要:用ng-if判断当displayMore值为false时列表状态为收起状态,显示的按钮为展开按钮; 当displayMore的值为true时列表状态为展开状态,显示的按钮为收起按钮; html代码: 展开时状态: 阅读全文
posted @ 2017-09-14 16:29 芒果加冰 阅读(214) 评论(0) 推荐(0)