Can someone assist me? I am encountering an issue where the partial view is not rendering properly using ui-router
in Angular.js. Below is my code snippet.
<!DOCTYPE html>
<html lang="en" ng-app="Spesh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Chinmaya Sahu">
<title>...:::WELCOME TO Spesh:::...</title>
<script src="js/pace.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/angularjs.js" type="text/javascript"></script>
<script src="js/angularuirouter.js" type="text/javascript"></script>
<script src="js/loginRoute.js" type="text/javascript"></script>
</head>
<body>
<div ui-view>
</div>
<script src="controller/loginController.js"></script>
<script src="js/default.js"></script>
<script src="controller/dashboardController.js"></script>
</body>
</html>
loginRoute.js:
var Dahboard=angular.module('Spesh',['ui.router']);
Dahboard.run(function($rootScope, $state) {
$rootScope.$state = $state;
});
Dahboard.config(function($stateProvider, $urlRouterProvider,$locationProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider
.state('/', { /*....This state defines All type of user login...*/
url: '/',
templateUrl: 'dashboardview/login.html',
controller: 'loginController'
})
.state('dashboard', { /*....This state defines All type of user login...*/
url: '/dash',
templateUrl: 'dashboardview/dashboard.html',
controller: 'dashboardController'
})
})
The configuration page above seems to be causing issues as the login.html page is not rendering correctly on the index page. Any suggestions on how to resolve this problem would be greatly appreciated.