我正在使用angularUI typehead作为输入元素.我正在使用自定义模板来显示值.一切正常.我的问题是如何将其ng-template分成单独的文件,以便它也可以在其他文件中重复使用.
如果我的话不清楚,请注意我是指ng-templates具体而不关心其他单独的HTML内容
这是代码:
// custom template begin
// this is the ng-template
// I'd like to move this custom template into to another file
// similar to partials
<script type="text/ng-template" id="customTemplate.html">
<a>
<b>{{match.model.name}}</b>
<div>{{match.model.username}}</div>
</a>
</script>
//custom template end
// input element makes use of the ng-template defined above
<div class="form-group">
<label class="col-md-2 control-label normal" for="assignTo">Assign To</label>
<div class="col-md-3">
<input name="bug_assignTo" id="bug_assignTo" ng-model="bug.assignTo" typeahead="user.username as user.name for user in config.users | filter:$viewValue | …Run Code Online (Sandbox Code Playgroud) 我正在使用带有Google Map V3的Infobox(附图).在点击Infobox时,我想进入详细信息页面.但是我无法在信息框上添加点击监听器.这是我正在使用的代码:

这是我的信息框配置:
var ib = new InfoBox({
alignBottom : true,
disableAutoPan: false,
maxWidth: 0,
pixelOffset: new google.maps.Size(-125, -50),
zIndex: null,
closeBoxURL: "",
infoBoxClearance: new google.maps.Size(1, 1),
isHidden: false,
pane: "floatPane",
enableEventPropagation:false
});
Run Code Online (Sandbox Code Playgroud)
我添加了这个信息框的监听器:
google.maps.event.addListener(ib, 'domready', function() {
if(Ext.get(ib.div_)){
Ext.get(ib.div_).on('click', function(){
console.log('test on click')
}, this);
Ext.get(ib.div_).on('mousedown', function(){
console.log('test on click')
}, this);
}
});
Run Code Online (Sandbox Code Playgroud)
虽然enableEventPropagation = false,事件不会传播到MAP,但没有事件在信息框上工作.
虽然enableEventPropagation = true,事件(点击,mousedown)工作,但点击信息框的其他部分,它需要我映射或另一个标记.
不知道怎么解决这个问题?
我有一个用C#编写的Windows服务,它从MSMQ读取,并根据消息的类型将它分配给在工作线程中处理该消息的代理.应用程序从没有代理开始,并在消息到达MSMQ时在运行时动态创建
以下是它如何工作的基本图:

如果代理工作线程正在忙于工作,则消息将排队到其本地队列.到现在为止还挺好.但是,如果由于某种原因停止服务,则本地队列内容将丢失.
我想弄清楚什么是处理这种情况的最佳方法.现在本地队列是一个System.Concurrent.ConcurrentQueue.我可能使用Sql Ce db或其他一些持久存储,但我担心性能.我认为另一件事是只有当代理准备处理消息时才从MSMQ读取,但问题是我不知道MSMQ将包含什么消息.
我可以采取哪些方法来处理这个问题?