angular-viewstate
A state machine suited for angular 1.x digest
Installation
Requires browserify or similar npm-based build system.
In the command line:
npm install angular-viewstate --save
In your angular composition:
angular
Usage
{ // setup states var state =
Every state()
that is defined will produce a method on the go
object.
Every flag expression()
is an angular $watch
expression where any identifier is replaced by
(viewState === "<identifier>")
. When finalise()
is called the watchers are installed on the given scope
.