Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

angular-loader Uncaught ReferenceError: minErr is not defined #4437

Closed
shahmirn opened this issue Oct 15, 2013 · 9 comments
Closed

angular-loader Uncaught ReferenceError: minErr is not defined #4437

shahmirn opened this issue Oct 15, 2013 · 9 comments

Comments

@shahmirn
Copy link

We're using $script.js and angular-loader to async load our project and the introduction of minErr in 1.2.0-rc.3 is breaking.

http://plnkr.co/edit/rxxHSS0RZd6Xavsq5Njc?p=preview shows the error if you open up the console when running it.

@randallb
Copy link

Introduced by @petebacondarwin here:

https://github.com/angular/angular.js/blob/7a586e5c19f3d1ecc3fefef084ce992072ee7f60/src/loader.js

I think to fix, we could just remove the minErr reference or mock it. Not sure what the best approach is.

@kopa
Copy link

kopa commented Oct 21, 2013

'assertNotHasOwnProperty' is not defined too ...

@gbruins
Copy link

gbruins commented Oct 21, 2013

I believe line #7 of angular-loader.js should be:

(function(window, angular, undefined) {'use strict';

Currently line #7 is just:
(

@RangerRick
Copy link

I'm seeing this as well in rc3.

@capaj
Copy link

capaj commented Nov 8, 2013

It is also in 1.2.0

@klebba
Copy link

klebba commented Nov 9, 2013

Still seeing this error in 1.2.0 bower dist

@ghost ghost assigned petebacondarwin Nov 9, 2013
@petebacondarwin
Copy link
Member

I'll look into this.

On 9 November 2013 23:48, Casey notifications@github.com wrote:

Still seeing this error in 1.2.0 bower dist


Reply to this email directly or view it on GitHubhttps://github.com//issues/4437#issuecomment-28140032
.

@igorzg
Copy link

igorzg commented Nov 10, 2013

angular loader is not required if you load angular.js as your first dependency.
Because angular.module its part of angular.
http://plnkr.co/edit/T8MaIBGmKQokRezuyJx5?p=preview

But angular loader have bugs because its builded from src/loader wich requires minError and assertNotHasOwnProperty functions and $injectorMinErr which will trow an error if module dependency is not specified and module definition is not already defined.

https://github.com/angular/angular.js/blob/master/src/loader.js

@petebacondarwin
Copy link
Member

I have submitted a PR that fixes this.

jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
This significantly increases the size of the loader:
- minified: 1031bytes -> 1509bytes (+46%)
- minified + gzip: 593bytes -> 810bytes (+36%)

I'm not entirely sold on the idea of shipping minErr with the loade. With the current state, the angular-loader behavior is completely broken - this is just a quick fix, we can revisit this change in the future.


Closes angular#4437
Closes angular#4874
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
This significantly increases the size of the loader:
- minified: 1031bytes -> 1509bytes (+46%)
- minified + gzip: 593bytes -> 810bytes (+36%)

I'm not entirely sold on the idea of shipping minErr with the loade. With the current state, the angular-loader behavior is completely broken - this is just a quick fix, we can revisit this change in the future.


Closes angular#4437
Closes angular#4874
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.