无法将strongloop与angular.js集成,远程方法代码无法在lb.services中生成

时间:2015-02-19 05:07:40

标签: angularjs node.js mongodb strongloop

lb.services: -

        "login": {
          url: urlBase + "/Vendors/login",
          method: "POST"
        },

只有这种返回类型才能得到。 但它应该像dis: -

"登录":{

      params: {
        include: "user"
      },
      interceptor: {
        response: function(response) {
          var accessToken = response.data;
          LoopBackAuth.setUser(accessToken.id, accessToken.userId, accessToken.user);
          LoopBackAuth.rememberMe = response.config.params.rememberMe !== false;
          LoopBackAuth.save();
          return response.resource;
        }
      },
      url: urlBase + "/Users/login",
      method: "POST"
    },

1 个答案:

答案 0 :(得分:0)

在此处查看我在Angular上使用LoopBack的示例:https://github.com/strongloop/loopback-example-angular