我想在我的角2的應用程序使用ng2-datepicker。我遵循了上述頁面中給出的說明,但日期選擇器沒有顯示出來。控制檯記錄以下錯誤。NG2,日期選擇器不工作
url_resolver.js:248 Uncaught TypeError: uri.match is not a function
我app.module.ts
import { DatePicker } from 'ng2-datepicker/ng2-datepicker';
@NgModule({
declarations: [
AppComponent,
DatePicker
],
app.component.html
<datepicker [(ngModel)]="date" [expanded]="true"></datepicker>
角版本2.0.0
點的package.json
"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"@material2-extra/calendar": "0.0.14-1",
"core-js": "^2.4.1",
"moment": "^2.15.1",
"ng2-datepicker": "^1.1.0",
"rxjs": "5.0.0-beta.12",
"ts-helpers": "^1.1.1",
"zone.js": "^0.6.23"
},
有什麼建議?
謝謝
其中2個版本,您使用的角度,它在RC7 – harishr
得到解決,我採用了棱角分明2穩定版本 – Rose18