问题描述
在ember js中不推荐使用视图。我想将应用程序模板的tagName设置为空,因为我不希望我的内容被包装在一个div中 - 它会混淆我的CSS。以前,我通过创建一个views / application.js并设置 tagName:''
,但不建议使用视图 - 如何在没有视图的情况下执行此操作?
Views are deprecated in ember js. I want to set the tagName for the application template to "empty" because I don't want my content wrapped in a div - it messes up my css. Previously I have don this by creating an views/application.js and setting tagName: ''
but views are deprecated - how can I do this without views?
推荐答案
虽然我同意这可能不是你想要做的事情的意见,你可以使用 addon,直到可释放的组件被释放。
While I agree with the comments that this may not be something you want to do, you can use the ember-legacy-views addon until routable components are released.
无标题组件也在 RFC,您可能会感兴趣。
Tagless components are also mentioned in the Component Unification RFC, which you might find interesting.
这篇关于在ember js中的应用程序模板上设置tagName的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!