Few questions about code
rpCal opened this issue · 2 comments
Hi,
Greate job! I live much what you do!
I have question about your code. Im rly interested in your appoach. Why do you use .provider("snSkrollr") instead of use local controler in directive? You init the plugin on $document.read event?
Glad to hear it may prove useful for you. We're using an angular provider so we can expose skrollr configuration options at the angular config stage. This allows skrollr to be setup differently for different applications, making it easily reusable.
Check out this angular doc for more info:
https://docs.angularjs.org/guide/providers
Thanks!
You have right. Angular docs: "You should use the Provider recipe only when you want to expose an API for application-wide configuration that must be made before the application starts.", good to know this.
Great job. Im start use it :)