angularjs - Not getting the requested page after reload window using angular.js -


i facing 1 issue.when clicking <li><a href="course">course</a></li> link getting requesting page when refreshing page again not coming using angular.js.its shoqing me error the requested url /gofast/subject not found on server..i getting home page typing url oditek.in/gofast/.i explaining code below.

app.js:

var gofastoapp=angular.module('gofastohome',['ngroute']); gofastoapp.config(function($routeprovider,$locationprovider) {     $routeprovider     .when('/',{         templateurl : 'view/home.html',         controller  : 'homecontroller'     })     .when('/deptinfo',{         templateurl : 'view/info.html',         controller  : 'infocontroller'     })     .when('/timetable',{         templateurl : 'view/time.html',         controller  : 'timecontroller'     })     .when('/course',{         templateurl : 'view/course.html',         controller  : 'coursecontroller'     })     .when('/subject',{         templateurl : 'view/subject.html',         controller  : 'subjectcontroller'     })     .when('/hod',{         templateurl : 'view/hod.html',         controller  : 'hodcontroller'     })     .when('/faculty',{         templateurl : 'view/faculty.html',         controller  : 'facultycontroller'     });     $locationprovider.html5mode({       enabled: true,       requirebase: true     }); }) 

i adding base url in index page.see code below.

index.html:

<!doctype html> <html lang="en" ng-app="gofastohome"> <head>      <meta charset="utf-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <meta name="description" content="">     <meta name="author" content="">     <title>...:::welcome channabasavashwara institude of technology:::...</title>      <!-- pace load bar plugin - creates subtle load bar effect @ top of page. -->     <link href="css/pace.css" rel="stylesheet">     <script src="js/pace.js"></script>     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>     <script data-require="lodash.js@*" data-semver="2.4.1" src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js"></script><script src="js/angularjs.js" type="text/javascript"></script> <script src="js/angularroute.js" type="text/javascript"></script> <script src="controller/app.js" type="text/javascript"></script> </head> <body> <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="/gofast/">home</a></li>             <li class="dropdown">               <a href="/gofast/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">edit <span class="caret"></span></a>               <ul class="dropdown-menu">                 <li><a href="course">course</a></li>                 <li><a href="subject">subject</a></li>                 <li><a href="/hod">hod</a></li>                 <li role="separator" class="divider"></li>                 <li class="dropdown-header">nav header</li>                 <li><a href="/faculty">faculty</a></li>                 <li><a href="#">one more separated link</a></li>               </ul>             </li>             <li><a href="#">department</a></li>             <li><a href="#contact">time table</a></li>            </ul>           </div><!--/.nav-collapse -->       </div>     </nav> <script src="controller/homecontroller.js" type="text/javascript"></script>    <script src="controller/coursecontroller.js" type="text/javascript"></script> <base href="/gofast/"> </body> </html> 

here when clicking on course option required page coming when reloading same page again throwing above error.please me resolve error.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -