export node or angular module

the technique is based on the [gist by Andras Sevcsik][1]

[1]: https://gist.github.com/sevcsik/9207267