简体   繁体   中英

Error after updating angular 7 to angular 10 - AspNetBoilerplate

I've downloaded aspnetboilerplate angular template and upgraded the dependencies in my project according to it. After resolving compile time errors, I got a runtime error showing in the console window of the browser (screenshot attached)

ERROR TypeError: abp.ajax is not a function
    at Function.push.Kc6q.AppPreBootstrap.getApplicationConfig (AppPreBootstrap.ts:44)
    at Function.push.Kc6q.AppPreBootstrap.run (AppPreBootstrap.ts:34)
    at root.module.ts:35
    at new ZoneAwarePromise (zone.js:913)
    at Array.<anonymous> (root.module.ts:30)
    at ApplicationInitStatus.runInitializers (core.js:26795)
    at core.js:28060
    at _callAndReportToErrorHandler (core.js:28161)
    at core.js:28058
    at ZoneDelegate.invoke (zone.js:386)

在此处输入图片说明

My mistake, I forgot to add the following line in angular.json


    "scripts":[
    ...
    "./node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.jquery.min.js"
    ]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM