Forum Stats

  • 3,816,609 Users
  • 2,259,213 Discussions
  • 7,893,518 Comments

Discussions

Adding css to modules?

Venkata Rahul S
Venkata Rahul S Member Posts: 36 Blue Ribbon

As mentioned in the cookbook, given a view model and a view, the process to create a module config and an oj-module is pretty straight forward.

But the doc is silent on being able to import styles along with the view and viewModel.

Any hints on how to achieve this?

Tagged:

Best Answer

  • John 'JB' Brock-Oracle
    John 'JB' Brock-Oracle Posts: 2,776 Employee
    Answer ✓

    Normally when using oj-module, you are just adding "pages" to the overall application and any CSS used by those modules would be included in the CSS for the application as a whole.

    If you don't want that to be the case, and you would rather have CSS only available for that one specific module, you could add a <style> element to the top of the .html view file and it would work.

Answers