is there any way to provide a path to a controller file by using UI-ROUTER
this is my code
var kraveln = angular.module('kraveln', ['ui.router' , 'ngMessages' , 'ngDialog' ]);
kraveln.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/home');
$stateProvider
// for home_page
.state('home', {
url: '/home',// if home page means
views: {
'':
{
templateUrl: 'app/views/home_search_page.html',
controller: 'app/views/sample_controller.js' // sample controller for loading file.
},
'header_part':
{
templateUrl: 'app/views/header_one.html' //load first header
},
'footer_part':
{
templateUrl: 'app/views/footer.html' //load second footer
}
}
})
as like the template url can we load controller URL i tried but can't able to do so