ngroute - AngularJS routeProvider not pulling in content -


i'm confused why routing code isn't working. asked separate question bit ago , told should using routing instead of method using. moved on routing, i've done in past, it's not working , i'm lost issue is.

my actual index.php including top stuff, <div ng-view></div> , bottom stuff.

this app.js

var app = angular.module("lksu", ['ngroute']);  app.config(['$routeprovider', function($routeprovider) {  $routeprovider     // route home page     .when('/', {         templateurl : 'content.php',         controller  : 'homecontroller'     })      .when('/bios/:user_id?', {            controller: 'attorneycontroller',          templateurl: 'bio.php'     })      .otherwise({         redirectto:'/'     });  }]); 

i'm not /bio part working yet since plain old / isn't working. go root , see header, footer, etc, blankness content should be. error shows in console amazingly long gibberish seems saying injector, don't understand.

here's generated html code:

<html ng-app="lksu"> <head> <base href="/"> <script> $basehref = "/"; </script> <title>lawrence, kamin, saunders & uhlenhop llc</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script> <script src="js/jquery.js"></script> <script src="js/script.js"></script>  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> <link rel="stylesheet" href="css/style.css"> <meta charset="utf-8">  <!-- modules --> <script src="js/app.js"></script>  <!-- services --> <script src="js/services/attorneys.js"></script>  <!-- controllers --> <script src="js/controllers/homecontroller.js"></script> <script src="js/controllers/attorneycontroller.js"></script>   </head>  <body ng-controller="homecontroller">  <div id="header" class="container-fluid"> <div id="logo">     <div class="row">         <div class="col-xs-6">             <a href="index.php"><img src="images/logo.gif" border=0 /></a>         </div>         <div class="col-xs-3 tagline">             <p>not answers.<br/>solutions.</p>         </div>     </div> </div>  <nav class="navbar navbar-default"> <div class="container-fluid">     <div class="navbar-header">     <button type="button" class="navbar-toggle collapsed pull-right" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">     <span class="sr-only">toggle navigation</span>     <span class="icon-bar"></span>     <span class="icon-bar"></span>     <span class="icon-bar"></span>     </button>     </div>      <div id="navbar" class="collapse navbar-collapse">         <ul class="nav navbar-nav">             <li class="navbutton" id="about_button">about us</li>             <li class="dropdown navbutton" id="attorneys_button" ng-controller="attorneycontroller">                       <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">attorneys<span class="caret"></span></a>                       <ul class="dropdown-menu" role="menu">                         <li><a href="#/bios/2" class="biolink">thomas f. bennington, jr. </a></li>                         <li><a href="#" class="biolink">peter e. cooper </a></li>                         <li><a href="#" class="biolink">timothy j. edmier </a></li>                         <li><a href="" ng-click="myfunctions.load_bio(1);" class="biolink">mitchell b. goldberg </a></li>                         <li><a href="#">shannon l. hartzler </a></li>                         <li><a href="#">ted a. koester </a></li>                         <li><a href="#">kent lawrence </a></li>                         <li><a href="#">robert j. lawrence </a></li>                         <li><a href="#">john f. mahoney </a></li>                         <li><a href="#">christina m. mermigas </a></li>                         <li><a href="#">john s. monical </a></li>                         <li><a href="#">david l. reich </a></li>                         <li><a href="#">charles j. risch </a></li>                         <li><a href="#">raymond e. saunders </a></li>                         <li><a href="#">robert l. schlossberg </a></li>                         <li><a href="#">paul b. uhlenhop </a></li>                         <li><a href="#">michael wise </a></li>                         <li><a href="#">joseph a. zarlengo </a></li>                       </ul>                     </li>             <li class="navbutton" id="areas_button">practice areas</li>             <li class="navbutton" id="studies_button">case studies</li>             <li class="navbutton" id="news_button">news & events</li>             <li class="navbutton" id="articles_button">articles & presentations</li>             <li class="navbutton" id="contact_button">contact us</li>         </ul>     </div><!--/.nav-collapse --> </div> </nav>    <br clear="all" /> </div>  <div class="container-fluid">  <div ng-view></div>  <br clear="all" /> </div>    <div class="row"> <div class="col-md-12">     <div class="container-fluid">         <div id="footer">             <a href="index.html">home</a>             <a href="aboutus.html">about us</a>             <a href="attorneys.html">attorneys</a>             <a href="practiceareas.html">practice areas</a>             <a href="clients.html">clients</a>             <a href="casestudies.html">case studies&nbsp;</a>             <a href="newsevents.html">news &amp; events</a>             <a href="articlespresentations.html">articles &amp; presentations</a>             <a href="contactus.html">contact us</a>             <a href="disclaimer.html">disclaimer</a>              <br/><br/>             &copy; 2015 lawrence, kamin, saunders &amp; uhlenhop, llc             <br/><br/>             300 south wacker drive, suite 500, chicago, illinois 60606 &nbsp;|&nbsp; p: (312) 372-1947 &nbsp;|&nbsp; f: (312) 372-2389         </div>     </div> </div>  </div>    </body> </html> 

try this, , i'm guessing.

    app.config(function ($routeprovider) { $routeprovider // router home page .when('/', { templateurl: 'content.php' controller: 'homecontroller' })  .when('/bios/:user_id?', { controller: 'attorneycontroller', templateurl: 'bio.php' })  .otherwise({ redirectto:'/' }); }); 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -