如何将 INSPINIA bootstrap 添加到 Ember 应用程序

How to add INSPINIA bootstrap to Ember application

Ember 的第 3 方 bootstrap 模板的新用户,需要帮助。

我从 www.wrapbootstrap.com 购买了 INSPINIA 管理模板。下载附带多个预创建的项目,其中内置 INSPINIA(例如,Angular、Rails 等),但不适用于 Ember。我联系了创作者,想看看他们是否可以为 Ember 添加一个项目,但他们拒绝了。

所以,我很好奇,有人知道如何将 INSPINIA 添加到 Ember 网络应用程序吗?是不是简单到ember install bootstrap然后复制*.css文件?注意:INSPINIA 模板附带的文件远不止一个 *.css,我正在使用 ASP.NET CORE 2.2 for the web API.

感谢任何帮助。

几年前我做同样的事情时,我买了主题只是为了主题css。我使用了他们的 less 并将其集成到我现有的 ember 构建中。现在我会使用 scss 但这并不重要。

重要的是了解 bootstrap js 组件不会 简单地 在您的 ember 应用程序的上下文中工作。如果您希望回调、事件、绑定等存在于 ember 的上下文中(即在 ember 的运行循环和生命周期内),您将需要包装每个单独的组件。幸运的是,ember-boostrap 可以为您做到这一点。这个插件为您提供了最简单的方法来获取您的 bootstrap scss。此插件也不使用 bootstrap 的 js,而是 bootstrap 组件的完整实现,即 ember-aware.

ember-bootstrap deliberately excludes bootstrap.js because the jQuery and Ember ways of control flow and animation sometimes don't play well together, causing unpredictable results. This is the main motivation behind ember-bootstrap. It is possible to import bootstrap.js from bower_components or the vendor folder. This is NOT recommended or supported, and you will be on your own. You have been warned!

一旦您在 ember-cli-build.js 文件中正确设置了 scss 预处理,您应该能够或多或少地直接使用它们的标记。但是,当您遇到 bootstrap 标记时(包含数据 类 的内容将由 bootstrap 的 js 处理),您将需要有一些了解。在那样的时刻,您只需使用 ember-bootstrap 个组件来代替