Cute - a small, readable edit of Angular

Cute is a small (<1000LOC), readable rewrite of a sub-set of AngularJS.

It's designed to help you understand how AngularJS really works, and perhaps be useful on modern mobile devices (it's 3kb gzipped + minified).

Do not expect Cute to be very useful yet - it's 0.0.0. Consider it something to read to get a good overview of how AngularJS works. Later, it might get to a stage where it'd be fun to use.



Counter in child scope


What's included


Cute has a compiler that features scopes, directives, controllers, transclusion and templates: all the goodness that makes AngularJS so powerful!


Cute's scope system allows you to $watch arbitrary Javascript expressions that can reference the scope as scope or s.


All your AngularJS favorites are present in Cute's core directives, with the cute prefix (te-). Take a look at the directives on offer.

All the tools used to write the core directives are available to you for use in writing your own.

What's edited out

Module system

Dependency injection doesn't require a dependency injection container, especially in dynamic languages. For languages like Java, the static type system makes lots of comming stubbing tasks very tricky in unit tests. Javascript doesn't share these problems.


Routing isn't coupled to Angular's core strengths. $router is normally replaced with ui-router to bring additional power. Cute will work with a router of your choice - documentation and a production ready version of a te-view component is TODO.


There's no need to provide a built-in AJAX library if we don't attempt to solve problems such as template loading. As AngularJS doesn't provide a module-loader, its built-in template loading is unlikely to be used in production anyway: the loading/build system you'll pick will handle it. Cute leaves AJAX up to you!

API documentation