我是角度的初学者,我正在使用角度材质对话框。首先,我将材料添加到我的项目中并从@angular/material.
当我在中添加 ( import { MatDialogModule } from '@angular/material/dialog';)) 时app.module.ts,在编译项目时出现以下错误
ERROR in node_modules/@angular/cdk/coercion/array.d.ts(10,60): error
TS1005: ',' expected.
node_modules/@angular/cdk/coercion/array.d.ts(10,61): error TS1005:
',' expected. node_modules/@angular/cdk/coercion/array.d.ts(10,75):
error TS1144: '{' or ';' expected.
node_modules/@angular/cdk/coercion/array.d.ts(10,77): error TS1011: An
element access expression should take an argument.
Run Code Online (Sandbox Code Playgroud)
为什么?
这是我的 package.json:
{
"name": "sales-maret",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^7.2.16",
"@angular/cdk": …Run Code Online (Sandbox Code Playgroud) 这是我的代码
public class AssistanceRequest : DocumentBase
{
public AssistanceRequest()
{
RequestTime = DateTime.Now;
ExcecutionTime = DateTime.MaxValue;
}
public AssistanceRequest(int amount, string description, DateTime? requestTime) : this()
{
//Check for basic validations
if (amount <= 0)
throw new Exception("Amount is not Valid");
this.Amount = amount;
this.Description = description;
this.RequestTime = requestTime ?? DateTime.Now;
}
private long Amount { get; set; }
private DateTime requestTime { get; set; }
public DateTime RequestTime
{
get { return requestTime; }
set
{
if (value …Run Code Online (Sandbox Code Playgroud) angular ×1
angular-cli ×1
angular9 ×1
asp.net-mvc ×1
c# ×1
dialog ×1
theory ×1
unit-testing ×1
xunit ×1