我的团队最近从4.3.0开始进入Angular 4.3.3。在这些更改之后,mdInput和md-input-container不再正常运行。在您点击输入字段之前,动画将如material.angular.io/components/input所示。
是否有其他人遇到此问题,如果是,您采取了哪些措施来解决这些问题?可能需要回到4.3.0。
package.json -
"dependencies": {
"@angular/animations": "^4.3.3",
"@angular/cdk": "^2.0.0-beta.8",
"@angular/common": "^4.3.3",
"@angular/compiler": "^4.3.3",
"@angular/core": "^4.3.3",
"@angular/flex-layout": "^2.0.0-beta.8",
"@angular/forms": "^4.3.3",
"@angular/http": "^4.3.3",
"@angular/material": "^2.0.0-beta.8",
"@angular/platform-browser": "^4.3.3",
"@angular/platform-browser-dynamic": "^4.3.3",
"@angular/router": "^4.3.3",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"ngx-clipboard": "^8.0.4",
"rxjs": "^5.4.1",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "^1.1.3",
"@angular/compiler-cli": "^4.3.3",
"@angular/language-service": "^4.3.3",
"@types/jasmine": "2.5.45",
"@types/node": "~6.0.60",
"codelyzer": "~3.0.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"node-sass": "^4.5.3",
"protractor": "~5.1.2",
"ts-node": "~3.0.4",
"tslint": "~5.3.2",
"typescript": "~2.3.3"
}
答案 0 :(得分:3)
我相信我找到了问题的答案。在我的index.html上,我正在链接到这个:
<link href="https://rawgit.com/angular/material2-builds/master/prebuilt-themes/indigo-pink.css" rel="stylesheet">
但是,当我从index.html中删除它并将其添加到styles.scss:
时@import '~@angular/material/prebuilt-themes/indigo-pink.css';
它运作得很好,我没有像以前那样的问题。