Skip to main content
Patrick's user avatar
Patrick's user avatar
Patrick's user avatar
Patrick
  • Member for 10 years, 10 months
  • Last seen more than 3 years ago
awarded
awarded
awarded
awarded
comment
Angular version of FitText
Could you explain how $$phase, in this context, is an anti-pattern? It seems pretty legitimate to me as $apply is already called on load, but is required when the window resizes to apply the updated font size. I've modified the code to remove this anti-pattern, but you essentially end up with something fairly messy in comparison: github.com/patrickmarabeas/ng-FitText.js/blob/master/… I can understand in a lot of cases its usage means you are probably doing something wrong - but it seems like a more succinct readable solution here?
comment
Angular version of FitText
Thanks for your points. The debounce function is taken from Underscore and stated as such in the module comments. Overkill doesn't concern me, but is there another way to extend configuration? As far as I'm concerned it's not a configurable module if config settings are blown away upon updating the module...
comment
Improvements to an Angular ScrollSpy module
Thanks for the points, Haven't had the time of late to push some changes I've been meaning to implement. I'll have to revisit !scope.$$phase and see what was going on there. Hopefully I'll get to posting a newer version in the next few days. I would be interested in whether codereview.stackexchange.com/q/42254/36695 is a good config implementation - it was what I was planning on replicating for this module as well...
awarded
revised
Loading…
awarded
revised
Improvements to an Angular ScrollSpy module
Added some more curiosities
Loading…
awarded
asked
Loading…
revised
Loading…
awarded
asked
Loading…
awarded
awarded