通过Angular表达式引用控制器中的嵌套对象

时间:2014-08-07 04:23:57

标签: angularjs object angularjs-directive angularjs-scope

对你所有角色的快速挑战。

在我的控制器中说我有类似

的东西
app.controller('testController', 
  function ($scope) {
    preWrittenFunction1 (function callBack () {
      preWrittenFunction2 {function callBack2 () {
        $(this).data = {JSON data};
      });
    });
});

我将如何访问表达式中的数据对象?如果在初始范围内,可以通过

访问
<html block>{{testController.data}}</html block>

0 个答案:

没有答案