我很困惑如何使用Yaml MapSlice数据结构。它从这里https://sourcegraph.com/go/gopkg.in/yaml.v2/-/MapSlice我设法解散一种地图片,但如何将它映射到我自己的结构
<div class='card-block'>
<ul>
<li *ngFor="let role of roles" [class.mysearch]="!(role.roleName.toLowerCase().indexOf(searchRole.toLowerCase())!== -1)" pDraggable='aroles' (onDragStart)='dragStart($event,role)'
(onDragEnd)='dragEnd($event)' [@flyInOut]="'in'">
<span class='col-md'>{{role.careerGroupId.technology}} - {{role.roleName}} ({{role.careerGroupId.domain}}) </span>
<span class="btn-success flex-xs-right" (click)="insertSelectedRole(role)">
<i class="fa fa-lg fa-angle-double-right"></i>
</span>
</li>
</ul>
<div class=”row”>
<div class="Filder">Filter by:<input [(ngModel)]="searchRole" type="text" class="Searchtextbox" placeholder="Search here"
/></div>
</div>
</div>
答案 0 :(得分:1)
您需要更改城市类型,因为您错过了一张地图。如果您的城市是您的代码有效的字符串地图的地图:
type cities map[string]map[string]cityLocales