Moved code generator to angular service

And filter to display code result