1.1 前端debug
/**定义基础控制器*/
app.controller('baseController',function ($scope,$http) {
/**获取登录用户名方法*/
$scope.loadUsername = function () {
/**定义重定向URL*/
$scope.redirectUrl = window.encodeURIComponent(location.href);
/**获取登录用户名*/
$http.get("/user/showName").then(function (response) {
debugger;
$scope.loginName = response.data.loginName;
});
};
});
- 可以在页面上直接写上 debugger;也可以直接在浏览器打断点。