The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Angular.js experience needed please!!! Reply To: Angular.js experience needed please!!!


We currently have a skeleton index file that will be injected with different views based on the nav link that is clicked.

A partial should be injected not the index file.

Sample index file:

  <div class="content" ng-view></div>

Then on click you would inject the partial into the view. Then your controller will direct traffic, something like:

var app = angular.module('app', []);

app.config(function ($routeProvider) {
      .when('/', {
        templateUrl: 'partials/home.html',
        controller: 'HomeController'
      .when('/about', {
        templateUrl: 'partials/about.html',
        controller: 'AboutController'
        redirectTo: '/'

In this case, when you request / it will load the home.html partial in partials directory.