我想在我的角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