I'm new to Angular and I'm using Angular-UI-Router with ASP.NET MVC 4.
app.config(['$urlRouterProvider', '$stateProvider', function ($urlRouterProvider, $stateProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider
.state('about', {
url: '/',
template: 'HELLO WORLD'
});
}]);
this works fine. HELLO WORLD is displaying so i know that everything is set up rather correctly.
but when i try templateUrl instead of template say:
app.config(['$urlRouterProvider', '$stateProvider', function ($urlRouterProvider, $stateProvider) {
$urlRouterProvider.otherwise('/'); //if you go to incorrect url it'll go back to home
$stateProvider
.state('about', {
url: '/',
templateUrl: 'Home/About.html'
});
}]);
nothing displays. I'm using almost a clean slate default template from scratch.. picking the "Internet Application" from default templates.. in my directories i have
Views --> Home --> About.html
I also have About.cshtml and I've tried that and it doesn't work neither. Help please!