In an Ember.js Handlebars template, is there a way to have both static and dynamic class attributes?

后端 未结 4 1978
青春惊慌失措
青春惊慌失措 2021-02-13 19:34

Using the already-overused to-do app example, let\'s say I want an element with a \"todo\" class (static) and an \"is-done\" class (dynamic):



        
4条回答
  •  庸人自扰
    2021-02-13 20:06

    In Ember master, a change was committed today to allow static classes to be specified within bindAttr by prepending a colon.

    https://github.com/emberjs/ember.js/commit/ce385e3294be019215c555511c7f393aebc02e41

    This may change before the next release, of course, but this is a problem that the Ember core team wants to solve.

提交回复
热议问题