Hi,
I am at my wits' end. Please help. On clicking the "Register Template"
link, I am getting a JavaScript error - Error: Could not resolve
'regTemplate' from state ''
at Object.x.transitionTo (angular-ui-router.min.js:7)
at Object.x.go (angular-ui-router.min.js:7)
at angular-ui-router.min.js:7
at angular.js:16299
at completeOutstandingRequest (angular.js:4924)
at angular.js:5312
Code:
Index.html
<!DOCTYPE html>
<html ng-app="ox-admin" xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="Scripts/jquery-1.9.1.js"></script>
<script src="Scripts/angular.js"></script>
<script src="Scripts/angular-resource.js"></script>
<script src="Scripts/angular-route.js"></script>
<script src="Scripts/angular-ui-router.min.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<link rel="stylesheet" type="text/css" href="Content/bootstrap.css" />
<title>OmniExchange - Administrator</title>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-2">
<!--Body content-->
<ul class="phones">
<li><a ui-sref="regTemplate">Register Template</a></li>
<li><a ui-sref="regDevice">Register Device</a></li>
<li><a ui-sref="regService">Register Services</a></li>
<li><a ui-sref="confAuth">Configure
Authentication</a></li>
<li><a ui-sref="confInt">Configure Integrations</a></li>
</ul>
</div>
<div class="col-md-10" ui-view>
</div>
</div>
</div>
</body>
</html>
app.js
/* App Module */
var oxadminApp = angular.module('ox-admin', ['ui.router']);
oxadminApp.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/htmls');
$stateProvider
.state('/regTemplate', {
url: '/regTemplate',
templateUrl: '/htmls/regTemplate.html'
})
.state('/regDevice', {
url: '/regDevice',
templateUrl: '/htmls/regDevice.html'
})
.state('/regService', {
url: '/regService',
templateUrl: '/htmls/regService.html'
})
.state('/confAuth', {
url: '/confAuth',
templateUrl: '/htmls/confAuth.html'
})
.state('/confInt', {
url: '/confInt',
templateUrl: '/htmls/confInt.html'
});
});
Please help.
Thanks
Nitin
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.