2017-05-10 34 views
0

由於我將材料更新爲beta3,因此我注意到發生了重大變化。將資料-2.0.0-b2升級爲b3

@import '[email protected]/material/core/style/variables'; 
@import '[email protected]/material/toolbar/toolbar'; 
@include toolbar-responsive-height($mat-toolbar-height-desktop); 

息率這樣的錯誤Undefined VariableFile to import not found or unreadable

如何解決這個問題的材料beta3版: 我的樣式表是由另一名設計師深的進口,例如寫的?

回答

2

深進口不再與素β3工作,所以你將有

@import '[email protected]/material/theming';

此外,以取代他們注意到,素β3現在取決於角4所以一定要檢查的了「重大更改」節更新日誌

https://github.com/angular/material2/blob/master/CHANGELOG.md

+0

我這樣做,再加上我增加了一些自定義變量來彌補「工具欄」。另外,我有一個配置的MdDialog - 已被替換。我現在如何更新我的代碼? – Moshe

+1

@Moshe,檢查這個例子:https://github.com/angular/material2/blob/master/src/lib/dialog/dialog.md。基本上,你在dialog.open方法中將數據作爲'{「data」:1234}'傳遞,然後使用'MD_DIALOG_DATA'將其注入到對話組件構造函數中。 – codestation