When testing my Angular app, I am using a Python simpleserver. I am new to ui.router and I am trying to get my index.html file to work properly. When attempting to navigate back home, I use the following code:
<a class="navbar-brand" ui-sref="/">MyApp</a>
To return to the home page or index.html.
Here is the code snippet:
"use strict";
var mainApp = angular.module('mainApp', ['ui.router']);
mainApp.config(function($stateProvider, $urlRouterProvider, $locationProvider) {
$urlRouterProvider.otherwise('/#');
$stateProvider
.state('/', {
url: '/',
templateUrl: 'index.html',
controller: 'mainController'
});
});
mainApp.controller('mainController',
function($state, $log, $scope, $rootScope, $http) {
$scope.test = 'foobar';
}
);
I would greatly appreciate any help in fixing this issue.