Tic Tac Toe using Angular and MobX

What is MobX? MobX solves the problem of state management in frontend apps, in a declarative, simple and performant way. It differs from other popular solutions by removing a lot of boilerplate, and allowing you to work with mutable data and OOP. The best way to explain how it works… »

SVG in Angular 2

If you just tried using SVG naively in Angular2, you will get weird errors, such as: main.bundle.js:27686 EXCEPTION: TypeError: Cannot set property r of #<SVGCircleElement> which has only a getter in [radius in [email protected]:26] Here are a few tips for building SVG components… »

Angular Dependency Injection. And Dolphins

Have you ever found yourself asking: should I use a value? a factory? a service? a provider?! Rules of thumb Ask yourself 3 questions: Do I need to inject it in the config phase? Does it have dependencies? Am I a dolphin? Then reduce which type of service you need… »

Using Browserify To Enhance Your AngularJS Tests

Why Reusing code between Protractor and unit-tests Using transpilers, like Babel, to allow ES6 code inside tests Using node modules, like faker and factory-girl Problem: Protractor & Jasmine require different API Say you have defined a mock for your user object: // user.mock.js function UserMock() { this.name = 'john doe';… »

AngularJS and Rails

There are many ways to combine a single page AngularJS app with Rails, and many things to consider. I will list a few methods and describe why we prefer a particular method over other options. Client Development Use gulp / grunt Don't use assets pipeline to serve client code Don't mix… »

Really?! You can do that with promises?!

We use promises all the time (especially on our girlfriends). Code with heavy use of promises tends to get clumsy on occasions. Usually there are elegant ways to do things with promises, but some programmers are just not aware of them. I'll demonstrate via use cases. The solutions are hidden… »

Better view code in AngularJS

View code tends to get messy and not reusable. Here are some tactics to make your view code more readble, testable, reusable and less prone to errors: 1. Isolated directives Directives are the most common way to reuse view code in AngularJS. To make a directive very reusable, make sure… »