I want to display multiple views using angular.js router.I am explaining my code below.
index.html:
<body>
<div id="wrapper" ng-view>
</div>
</body>
Inside this body part i am binding the following partial html page.
dashboard.html:
<!-- begin TOP NAVIGATION -->
<nav class="navbar-top" role="navigation">
<div class="nav-top">
<div class="text-left" style="padding-top:10px; width:800px; float:left;">
<span style="font-weight:bold; font-size:18px; vertical-align:middle; color:#FFF">Channabasavashwara Institude of Technology</span>
</div>
<ul class="nav navbar-right" style="float:right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-user"></i> <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li>
<a href="profile.php">
<i class="fa fa-user"></i> My Profile
</a>
</li>
<li class="divider"></li>
<li>
<a class="logout_open" href="logout.php">
<i class="fa fa-sign-out"></i> Logout
<strong>Admin</strong>
</a>
</li>
</ul>
</li>
</ul>
<div class="text-right" style="padding-top:15px; width:400px; float:right;">
<span style="font-size:12px; vertical-align:middle; color:#FFF">
Logged in as Admin</strong></span>
<span style="font-size:12px; color:#999">| </span>
<span style="font-size:12px; vertical-align:middle; color:#FFF" id="header-time">
</span>
<span style="font-size:12px; color:#999">| </span>
</div>
</div>
<!-- /.nav-top -->
</nav>
<div id="page-wrapper" class="collapsed">
<div class="page-content">
<nav class="navbar navbar-default navbar-fixed-top" style="margin-top:50px">
<div class="container" style="width:1270px;">
<div class="navbar-header navbar-brand">
Computer Science & Engineering
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#/">Home</a></li>
<li class="dropdown">
<a href="#profile" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">College profile<span class="caret"></span></a>
</li>
<li><a href="#dept">Colg.Department</a></li>
<li><a href="#princpal">Princpal</a></li>
<li><a href="#dept_head">Dept Head</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<!--<div class="row" style="padding-top:90px;" ng-view>
</div>-->
</div>
</div>
In this above file I have some multiple option in li tag.i need when i will choose any one option another partial view lets say profile.html will bind in this above page only.You can check one ng-view tag is inside comment line.
I have the below route file for index.html.
loginRoute.js:
var Admin=angular.module('Channabasavashwara',['ngRoute']);
Admin.config(function($routeProvider){
$routeProvider
.when('/',{
templateUrl: 'dashboardview/login.html',
controller: 'loginController'
})
.when('/dashboard',{
templateUrl: 'dashboardview/dashboard.html',
controller: 'dashboardController'
})
.when('/profile',{
templateUrl: 'dashboardview/profile.html',
controller: 'profileController'
});
})
Please help em to resolve this problem.
dashboard.htmlit has some list menu.I need here when user will click on any list option the respective page will bind in this samedashboard.htmlpage.index.html.dashboard.html is binding in this main template.I need some template will be bind on this dashboard.html template according to the list option.