我使用的是AspNet Boilerplate V.1.0。最近我遇到登录困难。登录时我收到错误:
Uncaught TypeError: Cannot read property 'Smart_campus' of undefined
at Object.abp.localization.localize (abp.js:28)
at Object.<anonymous> (abp.js:51)
at Object.app.localize (helpers.js:6)
at librarySettings.js:10
at librarySettings.js:19
Uncaught TypeError: Cannot read property 'name' of undefined
at app.js:1383
at Object.invoke (angular.js:4708)
at angular.js:4516
at q (angular.js:322)
at db (angular.js:4516)
at c (angular.js:1777)
at Ac (angular.js:1798)
at fe (angular.js:1683)
at HTMLDocument.<anonymous> (angular.js:31018)
at i (jquery.min.js:2)
app.js
var appModule = angular.module("app", [
"ui.router",
'ngAnimate',
"ngSanitize",
"ui.bootstrap",
'ui.utils',
"ui.calendar",
"ui.jq",
'ui.grid',
'ui.grid.pagination',
'ui.grid.autoResize',
'ui.grid.selection',
'oc.lazyLoad',
'angularFileUpload',
'daterangepicker',
'angularMoment',
'frapontillo.bootstrap-switch',
'abp',
'ui.grid.moveColumns',
'ui.grid.edit',
'ngMaterial',
'ngRoute',
'ngTouch',
'ui.grid.exporter',
'ui.grid.cellNav',
'ui.grid.validate',
'ui.grid.resizeColumns',
'ngInputModified'
]);
Smart_campus是我们的项目名称。 我很困惑在哪里检查原因。请帮我解决方案或指导。
答案 0 :(得分:0)
检查您是否在本地化中输入了重复的密钥
尝试使用此代码本地化字符串
abp.localization.localize(yourLocalizationKey, "Smart_campus");
答案 1 :(得分:0)
这是由于代码合并时AppAuthorizationProvider错过了一些权限定义。当我放回代码时,问题就解决了。
var feeCollection = Fees.CreateChildPermission(AppPermissions.Pages_Masters_feeCollection, L("FeeCollection"), multiTenancySides: MultiTenancySides.Tenant);
feeCollection.CreateChildPermission(AppPermissions.Pages_Masters_feeCollection_Create, L("CreateFeeCollection"), multiTenancySides: MultiTenancySides.Tenant);
feeCollection.CreateChildPermission(AppPermissions.Pages_Masters_feeCollection_Edit, L("EditFeeCollection"), multiTenancySides: MultiTenancySides.Tenant);
feeCollection.CreateChildPermission(AppPermissions.Pages_Masters_feeCollection_Cancel, L("CancelFeeCollection"), multiTenancySides: MultiTenancySides.Tenant);