• angular {{}}表达式在标签上的某些属性中不起作用的问题


    <div class="progress-bar" style=" {{item.progress||0 }}%">

    这是工作中遇到的一个进度条,样式是直接从bootstrap上弄下来的,进度条的宽度是{{}}表达式形式的,这种方式在ie8,9下是显示不出进度来的,ie8,9上就是这样:

    解决办法是:ng-style=“{item.progress||0+'%'}”;

    能FQ的话可以参考谷歌出来的http://stackoverflow.com/questions/13716993/angularjs-expression-not-working-within-style-attribute-on-ie8

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    另外一个类似的问题就是input标签的value属性:

    <input type="text" value=" ‘请输入’+{{items.num}}+'元' "> ,在ie8,9输入框中默认显示的内容就是表达式本身

    解决办法:ng-value=" ‘请输入’+items.num+'元' ">

  • 相关阅读:
    Python-Matplotlib 12 多图figure
    Python-Matplotlib 11 子图-subplot
    Python Day16
    Python Day15
    Python Day13-14
    Python Day12
    Python Day11
    Python Day9-10
    Python Day8
    Python Day8
  • 原文地址:https://www.cnblogs.com/fq1017/p/5594467.html
Copyright © 2020-2023  润新知