From 2a79ae01d7559103df656de1ad78d3890af66cba Mon Sep 17 00:00:00 2001 From: Thomas Wade Date: Wed, 17 Oct 2018 10:51:47 +1030 Subject: [PATCH] Enable HTML5 routing --- index.html | 1 + scripts/app.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 1660c37..d50f0ab 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,7 @@ +
diff --git a/scripts/app.js b/scripts/app.js index acf1832..3878da7 100644 --- a/scripts/app.js +++ b/scripts/app.js @@ -1,13 +1,14 @@ var app = angular.module("app", ["ngRoute"]); app.config( - function ($routeProvider) + function ($routeProvider, $locationProvider) { $routeProvider .when("/", {templateUrl: "views/news.html", controller: "news"}) .when("/content", {templateUrl: "views/content.html", controller: "content"}) .when("/about", {templateUrl: "views/about.html", controller: "about"}) .when("/login", {templateUrl: "views/login.html", controller: "login"}); + $locationProvider.html5mode(true); } );