use angularjs service for analysis cases