Kah*_*una 5 javascript datepicker angularjs
我目前正在使用Angular构建Web应用程序,我正在为一些UI组件使用Angular Material.目前,我有一个我无法解决的问题.当我使用https://material.angularjs.org/latest/demo/datepicker上描述的日期选择器时,窗口会打开,但它会保持为空.

这是datepicker的代码片段.
<md-datepicker ng-model="vm.registrationData.birthDate"
md-placeholder="{{'start_register_birth_date' | translate}}"
required></md-datepicker>
<div class="error-message"
ng-messages="registerForm.birthDate.$error"
ng-if="registerForm.birthDate.$touched && registerForm.birthDate.$invalid">
<div class="arrow-right"></div>
<p ng-message="required">{{'start_register_error_birthDate_required' | translate}}</p>
</div>
Run Code Online (Sandbox Code Playgroud)
我的进口可能有问题吗?
<!-- bower:js -->
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-messages/angular-messages.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="bower_components/angular-translate/angular-translate.js"></script>
<script src="bower_components/angular-translate-loader-static-files/angular-translate-loader-static-files.js"></script>
<script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
<script src="bower_components/angular-cookies/angular-cookies.js"></script>
<script src="bower_components/angular-aria/angular-aria.js"></script>
<script src="bower_components/angular-material/angular-material.js"></script>
<script src="bower_components/moment/moment.js"></script>
<!-- endbower -->
<script src="js/app.min.js"></script>
<script src="js/config.min.js"></script>
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/angular-material/angular-material.css" />
<!-- endbower -->
<link rel="stylesheet" type="text/css" href="css/styles.css" />
Run Code Online (Sandbox Code Playgroud)
pph*_*m27 18
使用较早版本的Angular,比如说1.5.9.Angular 1.6禁用控制器的预绑定.
有关详细信息,请参阅问题#10168.你可以加
angular.module('myApp', [])
.config(function($compileProvider) {
$compileProvider.preAssignBindingsEnabled(true);
});
Run Code Online (Sandbox Code Playgroud)
如果你坚持使用Angular 1.6.
| 归档时间: |
|
| 查看次数: |
1917 次 |
| 最近记录: |