From 84cc93fbb0660ab4e6283269f354580accb734a2 Mon Sep 17 00:00:00 2001 From: David Cormier Date: Sun, 27 Oct 2013 15:49:51 -0400 Subject: [PATCH] Initialize angularjs routing module --- index.html | 1 + js/websockets.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index e0be133..a129d75 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,7 @@ + diff --git a/js/websockets.js b/js/websockets.js index 7cfdc43..0f3f620 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -1,4 +1,4 @@ -var weechat = angular.module('weechat', ['localStorage', 'weechatModels', 'plugins', 'ngSanitize']); +var weechat = angular.module('weechat', ['ngRoute', 'localStorage', 'weechatModels', 'plugins', 'ngSanitize']); weechat.filter('toArray', function () { 'use strict'; @@ -755,3 +755,13 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', }] ); + +weechat.config(['$routeProvider', + + function($routeProvider) { + $routeProvider.when('/', { + templateUrl: 'index.html', + controller: 'WeechatCtrl', + }); + } +]);