angular.module('app').run(['$rootScope', '$state', '$stateParams', 
    function ($rootScope, $state, $stateParams) {
        $rootScope.$state = $state;
        $rootScope.$stateParams = $stateParams;
    }
]).config(['$stateProvider', '$urlRouterProvider',
    function($stateProvider, $urlRouterProvider){
        $urlRouterProvider.otherwise('/groupsSmsnew');
        $stateProvider.state('groupsSms',{
            url:'/groupsSms',
            controller:'GSmsController',
            templateUrl:'templates/groupsSms.html'
        })
        .state('groupsSmsnew',{
            url:'/groupsSmsnew',
            controller:'GSmsController',
            templateUrl:'templates/groupsSmsnew.html'
        });
    }
])