这是一个简单的HTML,
我有jquery-ui(1.10)和jquery(1.9.1).它在IE8,9,firefox和Chrome中仅在IE 7
HTML中运行良好,如下所示.我不知道那是什么,
当我在IE8,9,Firefox和Chrome中看到这个HTML时,这段代码就不存在了
sizzle-1367496452938="[object Object]
Run Code Online (Sandbox Code Playgroud)
以及注入的所有div标签
jQuery191030626454110549073="6"
Run Code Online (Sandbox Code Playgroud)
这是html的一些部分看起来像这样.任何人都知道这是什么问题?
<html sizzle-1367496167699="[object Object]">
<div class="container" id="container2"
sizzle-1367496452938="[object Object]">
<div class="arrow-left" id="wppanelstatus"
style="width: 1%;" jQuery191030626454110549073="6"/>
Run Code Online (Sandbox Code Playgroud)
更新
我不使用sizzle javascript选择器库
我想以 最快的方式比较2个字符串数组.
我有类似下面的东西.
这是正确的做法吗?或者有更好的方法
bool matching=false;
//say templateArr is the template array and dataArr as array to be compared
string[] templateArr = {"Dictionary_type","Translation_EN" };
string[] dataArr = { "Dictionary_type", "Translation_EN" };
if (templateArr.Union(dataArr).Distinct().Count() == templateArr.Count())
matching = true;
Run Code Online (Sandbox Code Playgroud) 我无法在提供者内部访问$ rootScope.我看了很多有角度的其他模块实现.它与我的实施方式相同.怎么了?它尝试将urload作为一个单独的函数(类似于其他getValue函数)它不起作用
错误是$ emit未定义
define(['angularAMD'], function () {
var contextServiceModule = angular.module('contextService', []);
var contextService = function () {
var context = {};
this.$get = ['$rootScope', function ($rootScope) {
console.log($rootScope);
return function (){
return {
init: init,
getValue: getValue,
setValue: setValue,
urlLoad: function () {
$rootScope.$emit('onInit', {});/// error here
}
};
};
}];
this.init = function () {
return context;
};
this.getValue = function (key) {
var value = context[key] ? context[key] : null;
return value;
};
this.setValue = function …Run Code Online (Sandbox Code Playgroud)