You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
679 B

7 years ago
7 years ago
7 years ago
  1. 'use strict';
  2. angular.module('app', [
  3. 'ngRoute',
  4. 'btford.socket-io',
  5. 'ngMaterial',
  6. 'app.chat'
  7. ])
  8. .factory('socket', function(socketFactory) {
  9. return socketFactory({
  10. ioSocket: io.connect('localhost:3000')
  11. });
  12. //return socketFactory();
  13. })
  14. .config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
  15. $routeProvider
  16. .when('/', {
  17. templateUrl: 'views/chat/chat.html',
  18. controller: 'ChatCtrl'
  19. });
  20. $locationProvider.hashPrefix('!');
  21. $routeProvider.otherwise({redirectTo: '/'});
  22. }]);