In the script.js , you are using 'template'
and wrote '<home></home>'
, but you have home.html. and you want to use home.html as a template.
You should use templateUrl: 'home.html'
instead template:'<home></home>'
Also change your code for template: <about></about>
& template: <contact></contact>
(function() {
'use strict';
angular.module('myVin', ['ui.router', 'homeModel'])
.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider
.state('home', {
url: '/',
template: '<home></home>'
})
.state('about', {
url: '/about',
template: '<about></about>'
})
.state('contact', {
url: '/contact',
template: '<contact></contact>'
});
});
})();
see in the snapshot, please do change in red box in your code :
use this code in script.js and run again your code will run successfully:
(function() {
'use strict';
angular.module('myVin', ['ui.router', 'homeModel'])
.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider
.state('home', {
url: '/',
templateUrl: 'home.html'
})
.state('about', {
url: '/about',
templateUrl: 'about.html'
})
.state('contact', {
url: '/contact',
templateUrl: 'contact.html'
});
});
})();
See the snapshot after changing the code:

@Arjun:
Your code is also correct, add some html in your template ( Like, i have done, i wrote template: '<h1>Shubham Verma</h1>'
)
(function() {
'use strict';
angular.module('myVin', ['ui.router', 'homeModel'])
.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider
.state('home', {
url: '/',
template: '<h1>Shubham Verma</h1>'
})
.state('about', {
url: '/about',
templateUrl: 'about.html'
})
.state('contact', {
url: '/contact',
templateUrl: 'contact.html'
});
});
})();
Please see the snapshot:
