【问题标题】:Angular Schema Form HTML Attributes?Angular Schema表单HTML属性?
【发布时间】:2016-03-20 21:47:22
【问题描述】:

我一直在查看 Angular Schema Form 文档,以便能够将属性应用于在以下位置生成的元素:https://github.com/Textalk/angular-schema-form/blob/development/docs/index.md

上上下下找了好久,一无所获。我通过定义模式看到您可以定义自定义 HTML 类:

htmlClass: "street foobar",  // CSS Class(es) to be added to the container div
fieldHtmlClass: "street"     // CSS Class(es) to be added to field input (or similar)
labelHtmlClass: "street"     // CSS Class(es) to be added to the label of the field (or similar)

但是,我无法找到可以在哪里应用属性,例如 data 属性或特定于元素本身的属性。您希望从表单生成中获得与此类基本功能有关的任何资源?

有什么想法吗? 谢谢!

【问题讨论】:

    标签: angularjs angular-schema-form


    【解决方案1】:

    我认为这不可能完全通过 json 模式定义来完成,您必须扩展 Schema Form 并提供您自己的带有自定义属性的 HTML 模板。我自己也遇到过这个问题,也不得不这样做。

    我相信你已经看过了,但这里是关于扩展的文档:

    https://github.com/json-schema-form/angular-schema-form/blob/master/docs/extending.md

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-14
      • 2015-01-08
      • 2017-09-20
      • 1970-01-01
      相关资源
      最近更新 更多