07 Sep 2014
Ok so the title is a bit misleading. Yes, it is possible to write selector engine, but when we talk about a selector engine as complex as Sizzle then it’s another story. Don’t get me wrong I am not saying your JS skillz aren’t up to the task, but it’s a pretty heavy task considering the back browser compatibility and all the methods that come bundled along with the selector engine. Recently my vanilla JS skills were tested and I realized - well - they could be better. We have had the crutch, if you wanna look at it that...
28 Aug 2014
Being able to mock is what unit testing is all about this paradigm plays an especially important role in AngularJS unit testing. We mock our application’s environment. We mock data using constants. We mock services using functions. All in order to test how a certain portion of an application should preform in production. As AngularJS is built upon modularity of code, our unit tests should be no different. How then do we then mock controllers? First off I think it’s important to note why I am asking this question in the first place. You might be thinking to yourself well...
21 Aug 2014
In Angular everything seems to have a steep learning curve and unit testing an Angular app definitely doesn’t escape this paradigm. When I started with TDD and Angular I felt that I was spending twice (maybe more) as much time figuring out just how to test and maybe even more just getting my tests set up correctly. But as Ben Nadel put it in his blog there are ups and downs in the angular learning process - his graph is definitely my experience with Angular. However as I have progressed in learning Angular and unit testing as well, now I...
14 Aug 2014
I was given what I thought was a nearly impossible task by my product owner - create an animation when changing states. I began using ngAnimate and came up with what I thought was a pretty cool solution to his problem - wrong. “This isn’t what I had in mind he told me. As I change between panels of a collapse widget I want to change the state and update the URL as well.” Me - “Oh boy…” So how else can I animate state transitions using an accordion like approach or in bootstrap terminology - the collapse widget? Back...
07 Aug 2014
So you have built a generic module and now you wanna use it in another project, but like any good developer out there you hate the idea of copying the code and pasting it into your new project. Welcome to the world of the bower component. For any developer out there who has been indoctrinated into the bower components knows their efficiency in making a working environment’s dependencies easily shareable. But what if we wanna make our own component, well its actually super simple and through the use of bower link we can even edit our component in the project...