我正尝试使用以下命令创建仪表板:
ng generate @angular/material:materialDashboard --name myDashboard
执行命令时,它导致错误:
Schematic "materialDashboard" not found in collection
"@angular/material". Error: Schematic "materialDashboard" not found in
collection "@angular/material".
at SchematicEngine.createSchematic (/Users/xyx/Desktop/Git/question-authoring-platform/node_modules/@angular-devkit/schematics/src/engine/engine.js:155:23)
at CollectionImpl.createSchematic (/Users/xyx/Desktop/Git/question-authoring-platform/node_modules/@angular-devkit/schematics/src/engine/collection.js:12:29)
at Object.getSchematic (/Users/xyx/Desktop/Git/question-authoring-platform/node_modules/@angular/cli/utilities/schematics.js:36:23)
at GenerateCommand.getOptions (/Users/xyx/Desktop/Git/question-authoring-platform/node_modules/@angular/cli/models/schematic-command.js:194:40)
at GenerateCommand.<anonymous> (/Users/xyx/Desktop/Git/question-authoring-platform/node_modules/@angular/cli/commands/generate.js:38:53)
at Generator.next (<anonymous>)
at /Users/xyx/Desktop/Git/question-authoring-platform/node_modules/@angular/cli/commands/generate.js:7:71
at new Promise (<anonymous>)
at __awaiter (/Users/xyx/Desktop/Git/question-authoring-platform/node_modules/@angular/cli/commands/generate.js:3:12)
at GenerateCommand.initialize (/Users/xyx/Desktop/Git/question-authoring-platform/node_modules/@angular/cli/commands/generate.js:30:16)
即使我尝试了myTable
和matNavbar
的其他命令
ng generate @angular/material:materialNavbar --name matNavbar
ng generate @angular/material:materialTable --name myTable
以上两个命令发生了相同的错误。我想念什么吗?
答案 0 :(得分:43)
调查发现,从materialShell
的{{1}}中删除了用于生成materialDashboard
,materialNav
,materialTable
和schematics/collection.json
的命令别名。相反,在使用它时,您只能使用它们的烤肉串形式。
@angular/material
所以不要使用像这样的旧命令
materialShell => material-shell
materialDashboard => material-dashboard
materialNav => material-nav
materialTable => material-table
使用
ng generate @angular/material:materialNav --name my-navbar
答案 1 :(得分:5)
在官方文档中
安装原理图
Sub INSERT_TRIM_COPY()
Sheets("COPY").Select
Dim Lastcolumn As Long
Lastcolumn = Range("A:AE" & Columns.Count).End(xlToRight).Column
Range("A51:AE51" & Lastcolumn).FORMULA = "=TRIM(A1)"
End Sub
发电机原理图
导航示意图
ng add @angular/material
仪表板示意图
ng generate @angular/material:material-nav --name <component-name>
表格示意图
ng generate @angular/material:material-dashboard --name <component-name>
答案 2 :(得分:3)
您可以使用以下软件进行安装:
DECLARE @STARTDATE VARCHAR='03/07/2018'
Select
CONVERT(VARCHAR, CloseDateTime, 103 ) AS INSPECTION_DATE,
CallProperties.ID,
(CallProperties.UserRef) AS ENGINEER,
(CallProperties.CallRef) as ReferenceNo,
(CallProperties.CallTypeName) as JobType,
(SELECT2) AS VEN_POSTCODE,
(ADVANCED_oil.PARENTid) AS PARENTID,
ADVANCED_oil.Panel_CustDetails_C_EAddress,
(ADVANCED_oil.Adv_OilTestComplete) as OilTestTaken
from CallProperties left JOIN ADVANCED_oil ON (ADVANCED_oil.ParentID=CallProperties.ID) where Adv_OilTestComplete='Low oil'
OR Adv_OilTestComplete='Tube restriction'
OR Adv_OilTestComplete='No dip stick'
OR Adv_OilTestComplete='Vendor refused' AND CONVERT(VARCHAR, CloseDateTime, 103 )=@STARTDATE
对于其他组件,它将是:
ng generate @angular/material:dashboard --name myDashboard
ng generate @angular/material:nav --name myNav
有关其他s的信息
ng generate @angular/material:table --name myTable