草庐IT

Aircrack-ng

全部标签

javascript - 使用 ng-repeat 和 limit-to 以及来自 tether.js 的工具提示时,在 jQuery 中出现上下文错误

首先,我知道这是一个非常棒的标题。我最近接手了angular-tooltip并正在尝试为我的主要工作项目构建自定义工具提示。在我的项目中,我有一个简单的ng-repeat指令使用库的说明,我定义了一个自定义工具提示指令:myApp.directive('companyProfileTooltip',['$tooltip',($tooltip)=>{return{restrict:'EA',scope:{profile:'@companyProfileTooltip'},link:(scope:ng.IScope,elem)=>{vartooltip=$tooltip({target:e

javascript - 使用 ng-repeat 时如何获得元素的正确高度和偏移值?

我正在尝试获取列表项的偏移量和高度。一旦我有了这些,我就在父指令上调用一个函数。最后,这将是进入View时进出的过渡元素。问题:由于ng-repeat(我不知道为什么),el[0].offsetheight和el[0].getBoundingClientRect().top;值几乎是随机的;除非,我在逻辑周围包装了一个$timeout。我认为这是因为样式有时间渲染?问题:如何在不包装$timeout或使用$watch的情况下获得准确的偏移量和高度。HTML:...JS:app.directive('spyed',function(){return{require:'^scrollSpy

javascript - Angular ng-options 在拼接上提供空选择选项

所以我有一个具有以下标记的AngularView:selecthandheldid页面加载时的vm.handheldKeys是一个数组,有两个值[0,24]。当页面加载时,呈现的HTML如下(为便于阅读而标记):selecthandheldid024这当然是您所期望的。现在,通过一些业务逻辑,在用户与页面交互之后,有一个拼接vm.handheldKeys数组的函数。因此,假设代码如下所示:vm.handheldKeys.splice(0,1);//Removethe'0'fromthearray现在,我得到的是以下呈现的HTML(注意第一个选择选项):selecthandheldid2

javascript - 如何使用 ng-table 进行服务器端分页?

我的代码是$scope.loadQuestions=function(){$scope.questionCount=0;$scope.questionTable=newNgTableParams({count:[]},{total:19387,getData:function($defer,params){$scope.filter.sort=params.orderBy();$scope.filter.page=params.page();return$http.get("/api/questions",{params:$scope.filter}).then(function(re

javascript - Angular2 ng2-图表自定义?

我已经开始使用angular2ng2-chart。对于我使用angular2ng2-chart创建的下图,我有几个问题,但仍想进行更多自定义:问题:1)当没有像上图Nov-7中那样的值为0(零)的值时,如何在两点之间画一条虚线?2)如何制作阴影效果、不透明度或多种颜色的组合?3)当我将鼠标悬停在任何定义的点上时以及如果我想在鼠标悬停时更改y轴网格颜色时如何获取y轴的值。使用ng2-chart悬停功能的最佳方法是什么?当前示例代码和配置文件:index.htmlOverviewindex.component.tsimport{Component,Output,EventEmitter,O

javascript - Angular ng-repeat 实现

我尝试实现Angularng-repeat指令,但我不明白为什么这段代码不能正常工作。.directive("myRepeat",function(){return{transclude:"element",priority:1000,compile:function(tElem,tAttrs){varmyLoop=tAttrs.myRepeat,match=myLoop.match(/^\s*(.+)+in\s+(.*?)\s*(\s+track\s+by\s+(.+)\s*)?$/),indexString=match[1],collectionString=match[2],pa

javascript - Angular : ng-if and ng-repeat not working after custom transclusion

我正在尝试在angularJS中对指令进行自定义嵌入,因为我需要将两个单独的元素嵌入到两个单独的位置。问题是,虽然一些指令在嵌入的内容上继续工作,例如ng-bind其他指令,例如ng-if或ng-repeat不要这样做,即使在使用正确的范围重新编译被嵌入的元素之后也是如此。示例:http://jsbin.com/menakapoma/1/edit?html,js,output正如您在示例中看到的那样,ng-bind有效,但ng-if无效,即使它们都在同一范围内并访问相同的值.ng-if的true或false状态都不起作用。我相信这是因为ng-if指令被嵌入为注释,但是即使我将嵌入指令的

javascript - grunt-ng-constant 目标不能持续工作

我在grunt-ng-constant中遇到了一个奇怪的问题,其中3个目标中只有2个有效。我的配置如下所示:grunt.initConfig({ngconstant:{options:{space:'',wrap:'"usestrict";\n\n{%=__ngModule%}',name:'config'},//Environmenttargetsdevelopment:{options:{dest:'/scripts/config.js',},constants:{ENV:{name:'development',apiEndpoint:'http://your-developmen

javascript - AngularJS - 如何处理 ng-repeat 与预先存在的项目

我正在尝试将ng-repeat用于列表。但我想要使用Django呈现的预先存在的列表项。注意:我已将{[{}]}设置为我的AngularJSInterpolateProvider。HTML示例{%foriteminexisting_list%}{{item.firstName}}{{item.lastName}}{%endfor%}{[{item.firstName}]}{[{item.lastName}]}现在,我想使用ng-controller处理这些项目app.jsfunctionListController($scope){$scope.items=[{firstName:"B

javascript - AngularJS 选择 ng-change 函数找不到选定的模型

我在处理一些基本的Angular数据绑定(bind)时遇到了问题。我的看法:AllPersons我的Controller:$scope.testdataset=[{name:"bill"},{name:"bob"},{name:"batman"}];$scope.personChanged=function(person){console.log(person);}效果很好——选择的名称已记录。Butthissimplyprints"undefined"whenanameisselected查看:AllPersonsController:$scope.testdataset=[{nam