简体   繁体   中英

cannot find name 'angular'

This code is angularjs 1.4x with ionic 3. I want to Implement this code some changes in angular 7 with ionic 4.I am getting error like this "cannot find name 'angular'". Please help me.

var vector = angular.element(document.querySelector('[ng-app=vectorApp]')).scope().$root;

Do not keep old codebase continuously you have to migrate some how someday so start it by now or you will face many issues keeping old codebase so my suggestion is migrate to Angular 2+

https://wtcindia.wordpress.com/2016/09/23/top-5-reasons-why-one-must-migrate-to-angular-2/

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