UPDATE
AngularJS works now. Switched to WebStorm IDE, but also had problem setting it up, that helped me: Bower "Git not in the PATH" error (Bower “Git not in the PATH” error).
Soon I will try ngrouting under WebStorm again.
How can I remove index.html from my localhost URL? There are similar questions, but they couldn't help me.
Here is what I did so far:
index.html:
<head><title>MyApp</title></head>
<body>
<div ng-view>
<a href="#/menu">Menu</a>
<a href="#/main">Main</a>
</div>
</body>
app.js:
var app = angular.module('myApp', [
'ngRoute',
'ngResource',
'HTML5ModeURLs'
});
config.js:
app.config(['$routeProvider', '$locationProvider',
function ($routeProvider, $locationProvider) {
$route.html5Mode(true);
$routeProvider.
when('/menu', {
templateUrl: 'Modules/Menu/view.html',
controller: 'Modules/Menu/controller'
}).
when('/main', {
templateUrl: 'Modules/Main/view.html',
controller: 'Modules/Main/controller'
}).
otherwise({
redirectTo: '/menu'
});
}
]);