Testing AngularJS Templates, Directives, Controllers, Services, Factories, and Filters

Angular is a framework that offers impressive testing ability through unit tests and template-based testing, which we will consider template-based unit testing.

Read More

Common Jasmine Matchers for AngularJS

Below are some useful matchers for AngularJS testing. Add them to a file called “matchers.js” and be sure to add that file to your test runner.

Read More

A better safeApply with Angular 1.5

Many of you might have run into this error at some point in time:

Error: $digest already in progress

This is typically created when someone calls $scope.$apply() in the middle of their code. Angular can be finicky about calling $apply when the $digest loop (2) is being executed. The error is essentially saying “I’m already $applying a bunch of stuff, I can’t add any more to the list right now.”

Read More

Sass Guidelines

These are some general guidelines to writing effective Sass. The same information applies in general to Less, and to some extent CSS, however CSS won’t have the ability to nest selectors like Sass or Less.

Read More

Unit testing Angular the right way

There are a number of different methods used to test code, we’ll discuss integration testing and unit testing.

A unit test is a test which is written to verify the functionality of a relatively small piece of code. They are intended to be narrow in scope and cover what the programmer considers useful.

With Angular, there is no excuse for not testing.

Read More

Website Optimization – A General Guide + Angular

This article will describe some standard methods to use to optimize your websites. It will also include some tricks for Angular that will increase its performance. This is not going to be a comprehensive article, but it should highlight some of the key components of website and Angular optimization.

Read More

Promises

Javascript uses two execution models for code, one is synchronous, meaning code is executed iteratively and effectively one line at a time. The other model is asynchronous, where a bit of code can be executed later, after waiting for some event to occur. The rest of the code will execute in a synchronous fasion until the asynchronous event happens.

Read More