angularjs - How to use $routeProvider.otherwise()? -
i work on angularjs project.
here module definition:
(function () { "use strict"; var myapp = angular.module("dimmanagement", ["ngresource", "ngroute"]) .config(function ($routeprovider, $locationprovider) { $routeprovider.when('/dim/home', { templateurl: '/app/dim/dimview.html', controller: 'dimcontroller' }); $routeprovider.when('/dim/log', { templateurl: '/app/log/dimlogview.html', controller: 'dimlogcontroller' }); $routeprovider.otherwise ->? $locationprovider.html5mode(true); }); }());
i want use otherwise method of $routeprovider idea how can use it?
the intellisense of dose not give option select otherwise method.
just set property normal:
$routeprovider.otherwise({ redirectto: '/' });
depending on ide, wouldn't count on intellisense accurate (just opinion tho)
Comments
Post a Comment