angularjs - Why does my routing not work in Angular JS for URL? -
i use next configuration routing:
.config(['$routeprovider', function($routeprovider) { $routeprovider .when('/appointments', { controller: 'appointmentcontroller' }) }]) and controller:
.controller('appointmentcontroller', ['$scope', '$http', '$sce', function ($scope, $http, $sce) { alert('test') }]); url looks as: http://blogapp.com/appointments
so, have not error on page, alert() not work when enter url
try going
http://blogapp.com/#/appointments the hash included default angular.
Comments
Post a Comment