我遵循这里描述的步骤
Getting Angular UI to work和这里
How to integrate AngularUI to AngularJS?,但是无法获取弹出窗口的datepicker.
请注意,在接受的答案中,两个帖子中的小提琴都不起作用.
有什么建议么?这个小工具是在最后一个版本的角色工作吗?
更新:我的资源导入
<link href="/assets/jquery-ui-1.10.2.custom.min.css?body=1" media="all" rel="stylesheet" type="text/css" /> <link href="/assets/angular-ui.min.css?body=1" media="all" rel="stylesheet" type="text/css" /> <link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" /> <link href="/assets/bootstrap.min.css?body=1" media="all" rel="stylesheet" type="text/css" /> <link href="/assets/home.css?body=1" media="all" rel="stylesheet" type="text/css" /> <link href="/assets/project.css?body=1" media="all" rel="stylesheet" type="text/css" /> <script src="/assets/jquery.js?body=1" type="text/javascript"></script> <script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script> <script src="/assets/jquery-ui.js?body=1" type="text/javascript"></script> <script src="/assets/jquery-ui-1.10.2.custom.min.js?body=1" type="text/javascript"></script> <script src="/assets/angular.min.js?body=1" type="text/javascript"></script> <script src="/assets/angular-ui.min.js?body=1" type="text/javascript"></script> <script src="/assets/angular-resource.min.js?body=1" type="text/javascript"></script> <script src="/assets/bootstrap.js?body=1" type="text/javascript"></script> <script src="/assets/directives.js?body=1" type="text/javascript"></script> <script src="/assets/jquery.hotkeys.js?body=1" type="text/javascript"></script> <script src="/assets/module.js?body=1" type="text/javascript"></script> <script src="/assets/underscore-min.js?body=1" type="text/javascript"></script> <script src="/assets/application.js?body=1" type="text/javascript"></script>
模块声明:
angular.module('project',['ngResource','ui.directives']);
标签:
<input type="text" ng-model="date" ui-date/>
他们缺少外部引用(JS和CSS两者都有404).所以这可能是由于缺少引用.这是一个
working example.
请记住,AngularUI主要包装jQueryUI插件.所以你需要jQueryUI之前AngularUI和jQuery之前jQueryUI.和AngularUI之前的Angular.只需确保您具有以下CSS:
> jQueryUI(http://jqueryui.com/)
> AngularUI(http://angular-ui.github.io/)
>您的应用程式
而这些JS文件按以下顺序:
> jQuery,所以你可以安全地加载jQuery UI插件(Datapicker)> jQueryUI,所以你AngualrUI可以利用它的插件(Datepicker)> Angular,所以AngularUI可以访问Angular框架> AngualrUI>你的模块声明,引用ui.directives模块.