**This js file for the ui router is proper or not.The error displaying is "Error: Unknown provider: $stateProvider from routerApp"
this js files have been loaded in the Html file.
**
var routerApp = angular.module('routerApp', ['ui.router']);
routerApp.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/template1');
$stateProvider
// HOME STATES AND NESTED VIEWS ========================================
.state('template1', {
url: '/temp1',
templateUrl: 'templates/template1.html'
})
// ABOUT PAGE AND MULTIPLE NAMED VIEWS =================================
.state('template2', {
// we'll get to this in a bit
});
});
<!-- MAIN CONTENT -->
<div class="container">
<!-- THIS IS WHERE WE WILL INJECT OUR CONTENT ============================== -->
<div ui-view></div>
</div>
</body>
</html>
Please help.Thanks in advance
please see here : http://plnkr.co/edit/FYxpaHpKgvpEu6f1TZ7l?p=preview
I had the same problem, was solved replacing
by