Adding external CSS file to a BoilerplateJS projec

2019-07-20 01:52发布

I'm trying to incorporate some UI components to a BoilerplateJS project that I'm currently working on, to be specific I want to implement this [http://wijmo.com/wiki/index.php/Getting_Started_with_Wijmo] sample inside a BoilerplateJs component. How can I add the external css files to my BoilerplateJs project.

1条回答
2楼-- · 2019-07-20 02:13

There are several ways to import style-sheets.

  1. Directly in the index file. (Best suited for style-sheets of libraries such as jQueryUI and Wijmo in your case)
  2. As a theme, in themes module
  3. As a part of the module, in modules folder (Best suited for module specific styles such as position within the module, and module images).

For module specific styling, you can include files by file path (example):

Boiler.ViewTemplate.setStyleLink(cssPath);

or by CSS text itself:

Boiler.ViewTemplate.setStyleText(cssText);
查看更多
登录 后发表回答