我如何从角度流星中的辅助控制器访问数据

时间:2016-03-17 07:07:59

标签: angular-meteor

angular
    .module('inspinia')
    .controller('contentCtrl', ['$scope','$state','$reactive','$filter', function ($scope, $state, $reactive, $filter) {
        console.log('username:' + $scope.name);
        this.relevantId = "etp59iEcDbvuMq8vf";
        this.subscribe('role');
        this.helpers({
                roleData: () => {
                return role.findOne({ _id: this.getReactively('relevantId') });
              }
         });
        console.log('ownerID: is roledata' + JSON.stringify(this.roledata;));
 }]);

0 个答案:

没有答案