added query by topic in ng and controller