草庐IT

angular-ui-modal

全部标签

javascript - Chrome 扩展 : Insert fixed div as UI

我想使用chrome扩展程序将一个div插入到固定位置。它将覆盖您当前正在查看的页面。我担心的是我希望它可以在任何页面上工作而不改变它(除了插入我的固定div),但我不知道我这样做是否可行。目前,该按钮不会显示,我在让div显示时遇到了很多麻烦。顺便说一句,定位暂时只是临时的,一旦我在页面上得到它,我会正确定位它!:)这是我所拥有的:这是我的list:{"name":"poop","version":"0.1","manifest_version":2,"description":"shittyappI'mmaking","background":{"scripts":["script

javascript - Angular limitTo 过滤器的第二个参数 "begin"似乎在 Angular 1.3 中不起作用

我正在尝试对一组用户执行分页功能。使用Angularjs1.3。ng-repeat="userinusers|filter:searchText|orderBy:'lastName'|limitTo:pageSize:startPositiontrackbyuser.lanId"我想使用“开始”参数,即上面的startPosition变量,作为我的用户列表中每个页面的开始。当这不起作用时,我将任务简化为仅尝试限制为一组数字。$scope.numbers=[1,2,3,4,5,6,7,8,9,0];ng-repeat="ninnumbers|limitTo:2:2"那也没用。这给了我1和

javascript - 如何使用 Renderer2 在 Angular 中设置 native 元素的值?

我想设置nativeElement的innerText/innerHTML/textContent?this.render.setValue(this.nativeCloneLi.querySelector('.down.inn'),timeVal);其中timeVal是一个字符串元素已正确选择,但setValue似乎根本不起作用 最佳答案 您需要使用renderer.setProperty()而不是renderer.setValue()。import{Component,Renderer2,AfterViewInit,Elemen

javascript - Angular.js 和 ng-switch-when - 模拟枚举

为了某种类型安全,我想在我的Controller逻辑中引入一些枚举,所以例如我创建了这样的东西:varapp=angular.module('myApp',[]);varStateEnum=Object.freeze({"login":1,"logout":2})functionLoginCheckCtrl($scope){$scope.stateEnum=StateEnum$scope.loginData=StateEnum.login$scope.login=function(){console.log($scope.loginData?'loggedin':'notloggedi

javascript - Angular - TypeError : XX is not a function

也许我缺少某种属性,但我正在关注这个project我在我的Controller中收到此错误。TypeError:loginService.signinisnotafunction这是我的controller.jsangular.module('appcontrollers',[]).controller('LoginController',['$rootScope','$scope','$http','$location','$localStorage','loginService',function($rootScope,$scope,$http,loginService){$sco

javascript - Angular 2,添加 calc() 作为内联样式。使用括号的不安全插值

Angular2rc3我正在尝试动态添加calc()到模板中的元素。我有这样的东西。template:`"`exportmyClass{@Input()myInputObject:any;privatewidth:string;ngOnInit(){this.setWidth()}privatesetWidth(){letpercent=myInputObject.percent;this.width='calc('+percent+'%-20px)';}}如果我使用括号,DOM中的输出将如下所示。如果我去掉括号它会起作用(有点)它看起来像这样。这也行不通。有关如何添加calc()的任

javascript - Protractor 和 Angular : How to test two pages in an app, 一个接一个?

我想在我的Angular应用程序的两个单独页面上运行Protractor测试:/dashboard和/articles。复杂的是我必须手动登录应用程序。目前我有这个设置:varLoginPage=function(){ptor=protractor.getInstance();this.login=function(url){ptor.get(url);ptor.findElement(protractor.By.model('email')).sendKeys(config.LOGIN_EMAIL);ptor.findElement(protractor.By.model('pass

javascript - 样式属性中的 Angular 表达式在 IE 中不起作用

我有angular1.0.6(我知道它很旧)并且我有带表达式的样式属性:{{item.label}}它工作正常但不适用于IE(该应用程序需要适用于>IE10)。当我打开Developer工具时,样式属性不存在。我尝试创建自定义样式指令(因为我认为IE在Angular可以读取它之前删除无效属性)但是使用这个简单的代码,我遇到了一个错误TypeError:Cannotreadproperty'replace'ofundefined来自jquery(在googlechrome上测试过)因为在我的例子中item.color可以为null.directive("logStyle",functio

javascript - 如何在 typescript 中使用 angular-ui-bootstrap(模态)?

我想使用模态编辑表格中的一些数据。definitelyTyped的angular-ui-bootstrap的typescript定义中有各种接口(interface),但是它们没有记录,我找不到任何关于如何使用它们的示例。IModalScopeIModalServiceIModalServiceInstanceIModalSettingsIModalStackServicehttps://github.com/borisyankov/DefinitelyTyped/blob/master/angular-ui-bootstrap/angular-ui-bootstrap.d.ts#L1

javascript - jQuery-UI draggable error 'cannot call methods prior to init' , 在更新到版本 1.10.1

我在使用jQuery-UI1.8.2时可以正常使用可拖动插件,然后我更改为1.10.1。我发现的主要区别是在启用和禁用插件时,我不再需要使用:$this.draggable('option','disabled',true);但可以简单地使用$this.draggable('disable');但后来我意识到还有另一个问题。我得到这个错误,它弄乱了我的整个程序,我不知道如何修复它:Error:cannotcallmethodsondraggablepriortoinitialization;attemptedtocallmethod'enable'为了修复它,我确保在任何进一步的选项之