Angular “=” scope does not work with camelCase

荒凉一梦 提交于 2019-12-04 06:26:29

I think it is relating to the x- prefix. If you change it to anything like mShow, m-show, it will work.

From the HTML5 spec:

Attribute names beginning with the two characters "x-" are reserved for user agent use and are guaranteed to never be formally added to the HTML language. For flexibility, attributes names containing underscores (the U+005F LOW LINE character) are also reserved for experimental purposes and are guaranteed to never be formally added to the HTML language.

So avoid using x- for normal attribute name. :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!