Reputation: 12729
I am trying to display a view using angular js using module form .could you please tell me why it is not display my view or page I share my code on this link http://goo.gl/ocBdQ5
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/foundation.css" />
<script src="lib/angular.js" type="text/javascript"></script>
<script src="lib/angular-ui-router.js" type="text/javascript"></script>
<script src="js/firtdir/module.js" type="text/javascript"></script>
<script src="js/firtdir/router.js" type="text/javascript"></script>
<script src="js/firtdir/controller/firstcontroller.js" type="text/javascript"></script>
<script src="js/app.js" type="text/javascript"></script>
</head>
<body >
<div ng-app="firstApp">
<div ui-view="app"></div>
</div>
</body>
</html>
Upvotes: 0
Views: 42
Reputation: 7977
I have fixed the following issues and now your sample is working.
Demo: http://goo.gl/3eh5hz
index.html >> Directory name is corrected as "firstdir" in url
Routes >> controller should be inside views as follows
$stateProvider.state('app', {
url: '/app',
views:{
app:
{
templateUrl: 'js/firstdir/templates/firstpage.html',
controller:"firstcont"
}
}
});
Upvotes: 2