Comments (5)
Dupe of https://github.com/durated/angular-scroll/pull/11.
In my point of view it's not the library thats not minification compatible, it's your minifier that's not angular compatible. I'd suggest to either:
- use the minified version
- use ngmin or some variation
from angular-scroll.
That's your call :-) just passing on my findings. Personally I believe the library, any library like this, shouldn't have to rely on certain minifiers. Angular, in this case, provide a mechanism for the angular code to be safe regardless of which minifier is used.
Also, in a development environment the minified version of any library isn't much use should it ever need modifying
Like I said, your call. A small change means others won't run into the same issue :-)
from angular-scroll.
Well I do serve a production version (that's even the only version you can download in the release section) that is minified and uses the ['$window', function($window)]
syntax. If you want to compile it yourself then that's up to you, but I don't see the point unless you only want to use parts of the library (which is a valid use case in larger libraries, but maybe not this one although I made it possible to do so).
In the case of a development environment, your setup surely must support using different sources depending on environment? (For example serving Angular or jQuery from a CDN in production is a best practice that (most?) people use). If not then I also include a minification map which should be helpful for debugging minified scripts.
from angular-scroll.
We don't use any of the public CDN in production - not everybody does for various reasons.
In this particular setup we're using .net for the web api and delivery of views for the angular routes .net also takes care of our bundling. In terms of JavaScript, anything with .min in the filename is not used by .net when debugging. So for that reason, as well as the unreadablity of a minified file we use the un-minified ones - they get minified and bundled when publishing.
All I was doing was pointing out that this particular library was having issues with the minification process. We have utilized , perhaps half a dozen other libraries and none have followed the unsafe way (in terms of minification) to declare DI.
I have resolved the issue on our end and haven't had to resort to adding other libraries to perform minification for the odd script that doesn't follow our other practices.
It's a great library you have put together, like I said, just letting you know what I found.
from angular-scroll.
I changed so that the angular-scroll.js
is also preminified by ngmin but keep the source as I like it :-) This should probably solve your problem unless you cherry pick certain directives/services/etc.
from angular-scroll.
Related Issues (20)
- [Request] Define Scroll Container when triggering from controller HOT 1
- Strange Safari-only issue – scroll won't work with css transition HOT 2
- Scroll within IFrame isn't working HOT 1
- Is it possible to get the id of the element currently scrolled to?
- On a new view loaded, scrollToElementAnimated doesn't work. HOT 1
- [Request] Scroll Interrupt Threshold
- .scrollTo scrolling to 0 on X axis instead of other way
- scrollToElementAnimated not supported for horizontal scrolling?
- New version 1.0.1 not working for me HOT 4
- Bower file has an error
- du-scrollspy work's just on loading HOT 1
- angular 2+ version?
- Not Working in 1.6 version HOT 4
- Configuration?
- Why is there a 20 offset for determining position?
- Possibly unhandled rejection: undefined HOT 1
- support angular2+?
- Using same ID for scroll container across different views breaks scrolling
- Please update name of the project to angular js.
- Bottom spy isn't great with short pages HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-scroll.