angularjs 1.6.0 (latest now) routes not working

前端 未结 5 662
北恋
北恋 2020-11-22 03:57

I was expecting to see this question on Stackoverflow but didn\'t. Apparently I\'m the only one having this problem that seems to me to be very common.

I have a basi

5条回答
  •  悲&欢浪女
    2020-11-22 04:04

    Try this one might Help...

    In html or view Page

     
           Home
           

    In Script Page

    var app=angular
    .module('myModule',['ngRoute'])
    .config(function($routeProvider, $locationProvider) {
      $routeProvider
        .when('/Home', {
          templateUrl: 'FolderName/Home.html',
          controller: 'homeCtr'
        })
          $locationProvider.hashPrefix('');
         });
    

提交回复
热议问题