我有一个扩展 DomainService 抽象类的类,如下所示:
public class ScheduleManager : DomainService, IScheduleManager
Run Code Online (Sandbox Code Playgroud)
以下行不起作用:
throw new UserFriendlyException(L("ScheduleIsNotValid"));
Run Code Online (Sandbox Code Playgroud)
因为:Abp.AbpException:必须先设置LocalizationSourceName,才能获取LocalizationSource
只是想知道设置 LocalizationSourceName 的正确位置在哪里,就像在 MyCarParkControllerBase 中设置但在核心(域)层中设置一样?
顺便说一下,UserRegistrationManager 类中有两种本地化用法:
Line 96 >>> throw new UserFriendlyException(L("UnknownTenantId{0}", tenantId));
Line 101 >>> throw new UserFriendlyException(L("TenantIdIsNotActive{0}", tenantId));
Run Code Online (Sandbox Code Playgroud)
由于同样的问题而失败!
干杯,
我已经安装了ngx-mat-select-search并按照StackBlitz的示例进行操作。
该示例运行良好,就像在stackblitz中一样。然后,我更改了代码以使用我的动态数据。我正常加载数据,并且值列在 UI(可搜索下拉列表)中,但搜索栏不执行任何操作,也没有错误。
HTML:
<mat-form-field class="selectList-full-width">
<mat-select [formControl]="selectTechnicalRoomCtrl" [placeholder]="'SelectTechnicalRoom' | localize" #singleSelect>
<mat-option>
<ngx-mat-select-search [formControl]="selectTechnicalRoomFilterCtrl" [placeholderLabel]="'Search' | localize"></ngx-mat-select-search>
</mat-option>
<mat-option *ngFor="let technicalRoom of technicalRooms" [value]="technicalRoom">
{{technicalRoom.nameRoom}}
</mat-option>
</mat-select>
</mat-form-field>
<div class="p-r-25 btn-toolbar">
<button style="margin-left: 10px; padding: 0 1em;" mat-raised-button color="primary" >{{ 'ListPoints' | localize }}</button>
</div>
Run Code Online (Sandbox Code Playgroud)
TS:
export class HomeComponent extends AppComponentBase implements OnInit, AfterViewInit, OnDestroy {
technicalRooms: IdNameTechnicalRoomDto[] = [];
public selectTechnicalRoomCtrl: FormControl = new FormControl();
public selectTechnicalRoomFilterCtrl: FormControl = new FormControl();
/** list …Run Code Online (Sandbox Code Playgroud)