Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ember.js文本字段和css(twitter引导)_Css_Ember.js - Fatal编程技术网

ember.js文本字段和css(twitter引导)

ember.js文本字段和css(twitter引导),css,ember.js,Css,Ember.js,我想在Ember.Textfield上设置一些样式,即:style=“max width:100%”“。 我曾尝试使用attributeBinding来实现这一点,但没有多大成功。有人有有效的解决方案吗?尽管您最好使用CSS类名,但您可以扩展Ember.text字段并将“样式”添加到AttributeBinding中 App.StyledTextField : Ember.TextField.extend({ attributeBindings: ['style', 'type', 'val

我想在
Ember.Textfield
上设置一些样式,即:
style=“max width:100%”“

我曾尝试使用
attributeBinding
来实现这一点,但没有多大成功。有人有有效的解决方案吗?

尽管您最好使用CSS类名,但您可以扩展Ember.text字段并将“样式”添加到AttributeBinding中

App.StyledTextField : Ember.TextField.extend({
  attributeBindings: ['style', 'type', 'value', 'size']
})
现在您可以执行以下操作:

{{view App.StyledTextField 
  style="max-width: 100%"}}

虽然您应该更好地使用CSS类名,但是您可以扩展Ember.text字段并向AttributeBinding添加“style”

App.StyledTextField : Ember.TextField.extend({
  attributeBindings: ['style', 'type', 'value', 'size']
})
现在您可以执行以下操作:

{{view App.StyledTextField 
  style="max-width: 100%"}}

美好的昨天尝试过,但将样式:“最大宽度:100%”直接放在AttributeBind下的StyledTextField中。然而,如果没有斯奈斯,我可能会有定语宾语!昨天尝试过,但将样式:“最大宽度:100%”直接放在AttributeBind下的StyledTextField中。但是,如果没有s,我可能会有属性绑定