patrick patrick - 2 months ago 6x
Javascript Question

Angular JS ui-router not loading view

I am having trouble with my Angular JS ui-router and every question I have found on here shows a solutions I have already tried.

In my ui-view-tag my actual template is not displayed.

<body ng-app="myApp">
<div class="row">
<div class="col-md-6 col-md-offset-2">

This is my app.js

angular.module('myApp', ['ui.router'])
.config(['$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {

.state('home', {
url: '/',
templateUrl: 'home.html',
controller: 'MainCtrl'


Thank you very much everybody, I would really appreciate a short feedback on that.


The $urlRouterProvider otherwise() accepts the url path you want to redirect to. Therefore you must change: