angular rewrite of garza/spomecs