Closed salJoker closed 6 years ago
This is happening to me too. Error occurs when using Angular 1.6.4, Require 2.1.22, ui-router 1.0.5. If I switch to older versions of these libs, everything works fine.
Error message says:
TypeError: ng_from_import is undefined
@heniotierra which old versions exactly? I have the same problem
@CoconutTheSlayer I'm using
"angular": "~1.2.16", "angular-ui-router": "~0.2.18", "requirejs": "~2.1.14"
var cfg = data.$cfg || { viewDecl: {}, getTemplate: ng_from_import.noop };
Here, the ng_from_import will have an empty value, which occurs when I use AngularJS v1.6.6, RequireJS 2.3.3, and i-ui - router v1.0.6
@salJoker do you solved this problem?
@edeye @CoconutTheSlayer
This issue is duplicate of #3257 , and there christopherthielen mentions that adding the data below to the shim in your requirejs config might solve the problem. And this did solve the problem for me, with no need to use old versions of the libs.
shim: { 'angular': { exports: 'angular' }, 'angular-ui-router': ['angular'] },
var cfg = data.$cfg || { viewDecl: {}, getTemplate: ng_from_import.noop };
Here, the Ng_from_import will have an empty value, which occurs when I use AngularJS v1.6.4, RequireJS 2.3.3, and i-ui - router v1.0.5.