原創(chuàng)|使用教程|編輯:龔雪|2021-08-16 10:10:29.887|閱讀 294 次
概述:可直接利用DevExtreme Angular應(yīng)用程序模板快速創(chuàng)建一個簡單的Angular應(yīng)用程序,本文主要介紹如何生成一個新的應(yīng)用程序以及調(diào)整布局、添加視圖。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
DevExtreme Angular應(yīng)用程序模板可幫助您快速創(chuàng)建一個簡單的Angular應(yīng)用程序,其中包含一個導(dǎo)航菜單和響應(yīng)式布局中的多個示例視圖。
npx -p devextreme-cli devextreme new angular-app app-name cd app-name npm run start
生成的應(yīng)用程序已經(jīng)包含DataGrid和Form組件,您可以在src\pages\display-data\display-data.component.html 和 src\pages\profile\profile.component.html文件中分別找到它們的配置。
該應(yīng)用程序包括兩種布局,它們之間的唯一區(qū)別是工具欄所在的位置。
外部工具欄(默認(rèn))
內(nèi)部工具欄
要切換到另一個布局,請打開src\app\app.component.html文件并將app-side-nav-outer-toolbar元素替換為app-side-nav-inner-toolbar:
app.component.html
<app-side-nav-inner-toolbar title="{{appInfo.title}}"> <!-- Layout content is here --> </app-side-nav-inner-toolbar>
要生成帶有內(nèi)部工具欄的新應(yīng)用程序,請將--layout標(biāo)志設(shè)置為side-nav-inner-toolbar:
npx devextreme-cli new angular-app app-name --layout=side-nav-inner-toolbar
運行以下命令來添加視圖,--icon 指定中的圖標(biāo)。
npx devextreme add view view-name [--icon=IconName]
您可以在src\app\pages文件夾下找到添加的視圖,此命令還會為src\app\app-navigation.ts文件中添加的視圖創(chuàng)建導(dǎo)航菜單項。
DevExpress技術(shù)交流群4:715863792 歡迎一起進群討論
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@ke049m.cn
文章轉(zhuǎn)載自:慧都網(wǎng)