【问题标题】:CSS Styling issue in Cumulocity serverCumulocity 服务器中的 CSS 样式问题
【发布时间】:2019-04-05 16:03:16
【问题描述】:

我已经在 cumulocity 服务器中部署了我的 angular 7 项目。构建和部署应用程序时没有错误。但是,Bootstrap CSS 样式不能正常工作。

我在 package.json 中提到了这些依赖项。 "@c8y/ngx-components": "1004.2.0", "@c8y/style": "1004.2.0", "@ng-bootstrap/ng-bootstrap": "^4.1.0",

【问题讨论】:

    标签: angular7 cumulocity


    【解决方案1】:

    在新的 Angular Web SDK 中,Cumulocity 团队切换到 ngx-bootstrap。它包含在 ngx-components 中,因此无需添加。

    您的问题可能是缺少某些样式,因为 Cumulocity 仅带有引导程序的一个子集。您可能需要向您的应用添加引导 CSS 以使其正常工作:

    1. 在 package.json 中添加品牌条目:
    "c8y": {
        "application": {
          "name": "tutorial application",
          "contextPath": "tutorial-application",
          "key": "tutorial-application-key",
          "brandingEntry": "./branding/branding.less",
          "globalTitle": "Pied Piper IoT",
          "tabsHorizontal": true
        }
      }
    
    1. 然后在该文件中添加@c8y 样式和引导程序:
    @import '~@c8y/style/extend.less';
    @import '~yourpatt/to/boostrap.css';
    

    【讨论】:

      猜你喜欢
      • 2014-12-08
      • 2011-09-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-23
      • 1970-01-01
      相关资源
      最近更新 更多