Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.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
如何在AngularDart中大写acx记分卡值文本_Dart_Angular Dart_Angular Components_Dart Html_Dart Webui - Fatal编程技术网

如何在AngularDart中大写acx记分卡值文本

如何在AngularDart中大写acx记分卡值文本,dart,angular-dart,angular-components,dart-html,dart-webui,Dart,Angular Dart,Angular Components,Dart Html,Dart Webui,我试图使用acx记分板组件,但无法自定义其字体大小和文本转换:大写;标签、值和描述的名称。 那么,有人能帮我怎么做吗 app_component.html <button (trigger)="generateNames()"> Names </button> <ul> <li *ngFor="let item of names"> <acx-scorecard    selectable    

我试图使用acx记分板组件,但无法自定义其字体大小和文本转换:大写;标签、值和描述的名称。 那么,有人能帮我怎么做吗

app_component.html

<button (trigger)="generateNames()">
Names
</button>
<ul>
   <li *ngFor="let item of names">
      <acx-scorecard
          selectable
          [selected]="true"
          label="Selected scorecard"
          value="{{item.first}}{{item.second}}"
          description="Try clicking this">
      </acx-scorecard>
   </li>
</ul>

名字
app_component.dart

 import 'package:angular/angular.dart';
 import 'package:angular_components/    angular_components.dart';
 import 'package:english_words/english_words.

 @Component(
     selector: 'my-app',
     templateUrl: 'app_component.html',
     styleUrls: const ['app_component.css'],
     directives: const [
       CORE_DIRECTIVES,
       materialDirectives,
       ScoreboardComponent,
       ScorecardComponent,
   ],
   providers: const [materialProviders],
   )

    class AppComponent implements OnInit    {          
      var names = <WordPair>[];

      void generateNames() { names =    generateWordPairs().take(2).toList(); }

       @override void ngOnInit()   { generateNames(); }

  }
导入“包:角度/角度.dart”;
导入“包:角_组件/角_组件.dart”;
“导入”软件包:英语单词/英语单词。
@组成部分(
选择器:“我的应用程序”,
templateUrl:'app_component.html',
styleURL:const['app_component.css'],
指令:const[
核心指令,
物质指导,
记分板组件,
记分卡组件,
  ],
提供者:常量[材料提供者],
)
类AppComponent实现OnInit{
变量名称=[];
void generateNames(){names=generateWordPairs().take(2).toList();}
@重写void ngOnInit(){generateNames();}
}

目前,最好的解决方案是使用
大写字母


在内部,我们使用SASS mixin来定制样式。

不幸的是,该功能在开源版本中还不可用。SASS文件作为参考,可以向您展示我们如何针对不同的元素。我现在正在工作,以允许在您的项目中导入和访问它们

目前,一种解决方法是使用类似的css来针对记分卡的不同部分

这种技术唯一的问题是,如果用于表示记分卡的html元素发生更改,它很容易出现中断。mixin避免了这一点,因为它充当抽象,并且有一个契约,如果记分卡发生变化,它应该被适当地更新

例如,可以通过向包含记分卡的组件添加样式来更改标签的样式:

acx-scorecard ::ng-deep h3 { // targets the scorecard label
  text-transform: capitalize;
}

::ng deep是angular现在支持的/deep/的替代品。

您有任何错误吗?您是否直接在字符串上尝试了
toUpperCase()
?这没有显示任何错误。它只是简单地重新加载,没有任何更改value=“{{item.first.toUpperCase()}}{{item.second}}”它现在工作了,我如何将它的字体重量更改为粗体
acx-scorecard ::ng-deep h3 { // targets the scorecard label
  text-transform: capitalize;
}