angularjs - share state between controllers / unit test
js - applicative programing