草庐IT

glob_result

全部标签

javascript - Angular UI Bootstrap - 在 typeahead-no-results 上显示下拉菜单

尝试在typeahead没有结果时获取下拉菜单,但是下拉菜单不显示查看Noresult删除class="dropdown-menu"给我li没有结果,但我没有把它作为下拉菜单如果没有结果,我应该向谁切换此下拉菜单? 最佳答案 问题是下拉菜单永远不会被触发,并且无法正确呈现。您只是使标记可见。您可以设置auto-close="disabled"和is-open="true"以在noResults时正确显示下拉列表:noresults工作演示->http://plnkr.co/edit/4vVznXyjZo3HuIb2p5as?p=pr

javascript - 不能在 Windows 中将 GLOB 与 JSHint 一起使用?

我正在做一个NPM的PoC作为构建工具(http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/)。我是使用NPM的新手。目前,我只安装了JSHint和Mocha。我的packagae.json已附上。现在,当我在命令行(Windows7)中运行“npmrunlint”时,出现错误:c:\project>npmrunlistMyNPMProject@1.0.0lintc:\projectjshinttest/*.jsERROR:Can'topentest/*.js它在我更改脚本“lint”时起作用:“jshinttest

javascript - 如何忽略 Webpack 的 "Seems to be a pre-built javascript file...Try to require the original source to get better results."?

Webpack发出警告:“这似乎是一个预构建的javascript文件。虽然这是可能的,但不推荐这样做。尝试要求原始源以获得更好的结果。”但是,我包含的这个库是有意预构建的,因此使用应用程序不需要复制其构建步骤和配置。如何忽略此警告? 最佳答案 通过将预构建模块的路径添加到模块下的webpack配置中来解决此问题:module:{//...noParse:['/node_modules/prebuiltlib/dist/build.js',]//...}这有一个额外的好处,就是构建时间稍微快一些。

javascript - 抛出新的 TypeError ('callback provided to sync glob' )?

执行错误详情:#Node应用程序.jsthrownewTypeError('callbackprovidedtosyncglob')^TypeError:callbackprovidedtosyncglobatglob(C:\Users\z\Documents\node_modules\glob\glob.js:70:13)atObject.module.exports.getGlobbedFiles(C:\Users\z\Documents\Server\Config\config.js:31:4)atObject.(C:\Users\z\Documents\Server\app.j

javascript - 谷歌地图 API v3 - TypeError : Result of expression 'google.maps.LatLng' [undefined] is not a constructor

我正在创建一个静态html页面来显示数据中的多个位置。我刚刚复制了其中一个示例并正在向后工作,但我在Safari检查器中收到以下错误:main.js:1SyntaxError:Parseerrorsample.htm:10TypeError:Resultofexpression'google.maps.LatLng'[undefined]isnotaconstructor.这是我的html代码:MultiMarkersSampleviaGoogleMapsfunctioninitialize(){varmyLatlng=newgoogle.maps.LatLng(-30.2965590

javascript - 谷歌地图脚本打破 Safari TypeError : Result of expression 'document.body' [null] is not an object

我在我的网页中显示谷歌地图,它在除Safari之外的所有浏览器中都能正常工作。Safri使页面变白并且JS错误显示:TypeError:Resultofexpression'document.body'[null]isnotanobject.maps.google.com/maps/api/js?sensor=true®ion=nz&async=2&callback=initializeConfigMap:11TypeError:Resultofexpression'a'[null]isnotanobject.maps.gstatic.com/intl/en_us/mapfile

javascript - Google Map KML 图层地标点击事件返回 ZERO_RESULTS

将监听器附加到KML图层:varlayer=newgoogle.maps.KmlLayer('http://sites.google.com/site/kmlprototypes/kmls/temp.kml?dc_='+Math.random(),{suppressInfoWindows:true,preserveViewport:true});layer.setMap(map);google.maps.event.addListener(layer,'click',function(obj){alert(obj.featureData.id);});KML文件有效(通过验证api检查

javascript - "WARNING - Suspicious code. The result of the ' getprop' operator is not being used."是什么意思?

"WARNING-Suspiciouscode.Theresultofthe'getprop'operatorisnotbeingused."当我使用闭包编译器时,我在我的JavaScript代码中看到了两行。它们是不报告问题的其他类型定义中的类型定义。我应该寻找什么?编辑受影响的代码:/***@typedef{{playerId:number,playerName:string,baseScores:Array.,bonusScores:Array.,*teamScoreAdjustments:Array.}}*/wias.GameTableTeamMember;/***@typed

javascript - Grunt Globbing 模式

实现以下目标需要什么模式。匹配.tmp目录下的所有html文件>匹配.tmp/views中的所有html文件及其所有子目录(递归到任意深度)这是在Grunt文件中注册livereload任务。我尝试了以下几种配置。它匹配.tmp中的所有文件,但不匹配.tmp/views中的所有文件也试过了,'.tmp/{,views/**/}*.html'但结果相同。livereload:{options:{livereload:LIVERELOAD_PORT},files:['.tmp/{,views/**}*.html']} 最佳答案 你应该能

javascript - 选择 2 : Results not showing using AJAX

我无法使用AJAX在Select2中显示结果。这是我的代码:$(document).ready(function(){$("#producto").select2({placeholder:'Selectaproduct',formatResult:productFormatResult,formatSelection:productFormatSelection,dropdownClass:'bigdrop',escapeMarkup:function(m){returnm;},minimumInputLength:3,ajax:{url:'http://foo.foo/listar