重新初始化局部回传后角绑定 [英] Re-initialize Angular bindings after partial postback

查看:111
本文介绍了重新初始化局部回传后角绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用一些善良角度渗透到ASP.NET页面。问题是,页面有引起我的角度绑定恢复到花括号前pressions一些部分回发(更新面板){{属性}}。我可以看到的范围仍然存在于JavaScript控制台。

I am trying to infiltrate an ASP.NET page with some Angular goodness. The problem is that the page has some partial postbacks (Update Panels) that cause my Angular bindings to revert to curly bracket expressions {{ property }}. I can see that the scope is still there in the javascript console.

我如何更新面板响应结束后重新初始化角度的功能?我试着$消化和$适用的范围,但我的{{属性}}不再具有善良双向的。

How do I re-initialize the angular functionality after an Update Panel response ends? I tried $digest and $apply on the scope, but my {{ property }} no longer has the two-way goodness.

(P.S。我最终能够重新编写采用了棱角分明的服务都回发,但我有在几天的演示,所以它是目前鱼龙混杂。)

(P.S. I will eventually be able to re-write all the postbacks using angular services, but I have a demo in a few days, so it's a mixed bag at the moment.)

推荐答案

改变大括号分隔符在别的东西angularjs

change the curly braces delimiters to something else in angularjs.

var myApp = angular.module('myApp', [], function($interpolateProvider) {
    $interpolateProvider.startSymbol('[[');
    $interpolateProvider.endSymbol(']]');
});

这篇关于重新初始化局部回传后角绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆