如何从常规 bootstrap 迁移到 ui-bootstrap?
How to migrate from regular bootstrap to ui-bootstrap?
我开始使用常规 bootstrap. Then I came across ui-bootstrap. I already had some HTML mostly taken from examples from the bootstrap page customized a little. Actually working okay, but apparently ui-bootstrap 编写 angular 应用程序,这是与 angular 结合使用的方法。
我不明白的是如何从这里迁移我的 HTML?例如,下拉导航不再起作用。我是否必须通过 ui-bootstrap directives? Or do I have to change the classes like in the migration guide? I know, that the migration guid has nothing to do with migrating from bootstrap to ui-bootstrap. But the old names from ui-bootstrap seem to match the classes of bootstrap.
交换 data-* 属性
我是 angular 和 bootstrap 的新手,所以我在这里有点困惑,抱歉。
这取决于你的目标是什么。 ui-bootstrap 是 angular 风格的 bootstrap javascript 替换。它不依赖于 jQuery,因此如果您不需要 jQuery 用于其他目的,它可以显着减少您的足迹。
如果您的目标是删除 Bootstrap.js,那么您需要将数据属性替换为 ui-bootstrap 指令。
原版 Bootstrap 与 angular 配合使用也很好。
我开始使用常规 bootstrap. Then I came across ui-bootstrap. I already had some HTML mostly taken from examples from the bootstrap page customized a little. Actually working okay, but apparently ui-bootstrap 编写 angular 应用程序,这是与 angular 结合使用的方法。
我不明白的是如何从这里迁移我的 HTML?例如,下拉导航不再起作用。我是否必须通过 ui-bootstrap directives? Or do I have to change the classes like in the migration guide? I know, that the migration guid has nothing to do with migrating from bootstrap to ui-bootstrap. But the old names from ui-bootstrap seem to match the classes of bootstrap.
交换 data-* 属性我是 angular 和 bootstrap 的新手,所以我在这里有点困惑,抱歉。
这取决于你的目标是什么。 ui-bootstrap 是 angular 风格的 bootstrap javascript 替换。它不依赖于 jQuery,因此如果您不需要 jQuery 用于其他目的,它可以显着减少您的足迹。
如果您的目标是删除 Bootstrap.js,那么您需要将数据属性替换为 ui-bootstrap 指令。
原版 Bootstrap 与 angular 配合使用也很好。