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

fix(loader): don't rely on functions defined in Angular.js #4874

Closed
wants to merge 1 commit into from

Conversation

petebacondarwin
Copy link
Member

The loader had not been tested since minErr had been implemented so was breaking the phonecat tutorial application. Moreover I had added a call to assertNotHasOwnProperty, not understanding that loader does not get access to Angular.js functions.

The loader now has its own copies of minErr (via AngularFiles.js) and assertNotHasOwnProperty.

@petebacondarwin
Copy link
Member Author

Fixes #4437

@vojtajina
Copy link
Contributor

I have only concern about the code size. The angular-loader.min.js file is the "minimal" code that has to be loaded synchronously, then the rest of the app can be loaded asynchronously.

This change increases the size (because of including the miner):
1031bytes -> 1509bytes (minified)
593bytes -> 810bytes (minified + gzip)

There is only a single exception, so I'm thinking, is it worthy?

@vojtajina
Copy link
Contributor

@petebacondarwin can you add Closes #4437 to the commit msg and rebase on the top of the latest master?

@ghost ghost assigned vojtajina Nov 14, 2013
@vojtajina
Copy link
Contributor

Also, minErr uses other angular internal functions such as isDefined, isFunction, etc.

@vojtajina vojtajina closed this in 8425e9f Nov 14, 2013
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this pull request 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 pull request 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
@petebacondarwin petebacondarwin deleted the loader-fix branch February 11, 2014 09:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants