var Company;
(function (Company) {
var companyApp = angular.module('company', ['ngRoute', 'ngResource']);
companyApp.constant('servicePath', Company.PathHelper.construct(''));
companyApp.config(Company.HomeConfig);
companyApp
.controller('employeeController', Company.EmployeeController)
.factory('employeeResource', Company.employeeFactory)
.controller('departmentController', Company.DepartmentController)
.factory('departmentResource', Company.departmentFactory);
})(Company || (Company = {}));
任何人都可以帮助我为什么我会在线上获得下一个错误
companyApp.constant('servicePath', Company.PathHelper.construct(''));
未捕获的TypeError:无法读取未定义的属性“construct”
我的PathHelper:
var Company;
(function (Company) {
var PathHelper = (function () {
function PathHelper() {
}
PathHelper.construct = function (virtualPath) {
return location.protocol + '//' + location.host + '/' + virtualPath;
};
return PathHelper;
})();
Company.PathHelper = PathHelper;
})(Company || (Company = {}));