我正在使用1.x构建Angular Apps,并且已经有一段时间了.我使用Bower来安装Angular以及随之而来的各种软件包以及Shivs,JQuery,ChartJs等其他一些零件.我喜欢使用Bower因为它很好而且快速并且将所有内容保存在一致的地方供我参考.我使用Grunt以及我的任务运行器,所以我也希望能够自动化这个过程以实现丝滑顺利的开发.
现在随着我的Angular知识的增加以及我正在构建的应用程序的规模不断增加,我发现自己在index.html中包含了几十个文件调用,我真的想整理所有这些,理想情况下是不错的app.js让它更易于管理,不仅适合我自己,也适合其他任何进入这些应用程序的人.
我已经看到了诸如requirejs,browserify和commonjs之类的maaany工具,仅举几例,它们都提供了我所追求的功能,但是在阅读各种教程或观看会议上的会议时,它们似乎都与一个冲突另一个是最好的.我在某种程度上知道(与所有这些竞争技术一样)是个人偏好,我倾向于浏览器化,但显然这会从流程中移除bower并使用NPM.如果可能的话,我想坚持使用Bower.我真的很喜欢使用它.
有没有人有任何可以提供的建议或最佳实践可以为我解决这个问题?一个简单的concat与grunt/gulp只是要走的路吗?
任何有用的评论/答案将不胜感激.
非常感谢.
我正在尝试量角器测试是否当前可以看到确认记录删除的引导模式窗口.
要删除的记录显示在角度ng-repeat中,因此我必须从那里激活删除按钮.
如果我测试isPresent测试总是传递true,因为它在DOM中查找模态窗口,它将始终存在.但是,isDisplayed当我期望为真时,测试总是返回false.
这是一些代码......
// Use the .all repeater to search the array of presented records
element.all(by.repeater('entries in presentData')).then(function(presentData) {
// get the first record and open the options menu
presentData[0].element(by.css('.dropdown-toggle')).click();
// In that first record click the delete button
presentData[0].element(by.css('.delete-link')).click();
browser.waitForAngular();
// Remove the 'fade' class from the Bootstrap modal, I heard animations can cause some issues for testing
browser.executeScript("$('.modal').removeClass('fade');");
// Expect that the .modal-dialog is true
expect(element(by.className('modal-dialog')).isDisplayed()).toBe(true);
});
Run Code Online (Sandbox Code Playgroud)
我已经尝试了各种其他stackoverflow和github问题的各种组合,但到目前为止我没有任何工作.
任何你可能会流下的光都会非常感激!