Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dart 如何在angular2省道组件中包含.less文件_Dart_Angular_Less - Fatal编程技术网

Dart 如何在angular2省道组件中包含.less文件

Dart 如何在angular2省道组件中包含.less文件,dart,angular,less,Dart,Angular,Less,我想在我的dart angular 2应用程序中使用更少的预处理器。我到底是做什么的: 在pabspec.yaml文件中包含依赖项 -更少的省道: 入口点:web/main.less 构建模式:dart 将包含到index.html文件中 在web文件夹中,我还添加了main.less文件 在这一点上,我的应用程序工作正常,但当我尝试在中的其他组件中包含其他.less文件时,会导致ExOption,例如: 我创建了app.less文件,在里面我写了更少的代码 在app_component.dar

我想在我的dart angular 2应用程序中使用更少的预处理器。我到底是做什么的:

  • 在pabspec.yaml文件中包含依赖项
    -更少的省道:
    入口点:web/main.less
    构建模式:dart

  • 包含到index.html文件中

  • 在web文件夹中,我还添加了main.less文件 在这一点上,我的应用程序工作正常,但当我尝试在中的其他组件中包含其他.less文件时,会导致ExOption,例如:
  • 我创建了app.less文件,在里面我写了更少的代码
  • 在app_component.dart文件中,我像这样包含了它:
    styleurl:const['app.less'],
    因此,我有这样的假设:
  • 得到 加载文件包时出错:Project/app.less.dart


    你在
    pubspec.yaml
    中添加了
    transformers:-less_dart
    部分了吗?@GünterZöchbauer,是的,当然。我添加了依赖项:less_-dart:“^0.3.3”和变形金刚:-less_-dart:entry_-point:web/main.less build_-mode:dart以及自述文件中的
    entry_-points'
    不是
    entry_-point
    @GünterZöchbauer我写的entry_-points,它给出了相同的值effect@GünterZöchbauer我也有类似的问题,但这对我没有帮助,有额外的样品吗?