Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

171
Views
Why is my ngRoute in AngularJS not working

I am learning some AngularJS at school and we were asked to implement routing for our project but I am having some trouble with ngRoute:

Here is my js file (app.js):

var app = angular.module("myApp", ["ngRoute"]);

app.config(function ($routeProvider) {
  $routeProvider
    .when("/", {
      templateUrl: "index.html",
    })
    .when("/jadwal", {
      templateUrl: "showJadwal.html",
      controller: "jadwalController",
    })
    .when("/jadwalUjian", {
      templateUrl: "showJadwalUjian.html",
      controller: "jadwalUjianController",
    });
});

These are the files I have imported in my html:

    <script src="js/angular.js"></script>
    <script src="js/angular-route.js"></script>
    <script src="js/angular.min.js"></script>
    <script src="js/controllers/app.js"></script>

These are the hrefs:

<div id="navbar" class="collapse">
                <ul>
                    <li class="active"><a href="#!/" data-nav-section="home">Home</a></li>
                    <li><a href="#!jadwal">Jadwal</a></li>
                    <li><a href="#!jadwalUjian">Jadwal Ujian</a></li>
                    <li><a href="#" data-nav-section="skills">To Do List</a></li>
                </ul>
            </div>

Plus I have also placed <div ng-view></div>

Any kind of help would be greatly appreciated :)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!