angularjs - How do I route off a module in Angular -
i have module declared.
var app = angular.module('myapp', ['donor.donation.donationcontroller']);
here setup of donationcontroller
.
var donationmodule = angular.module('donor.donation.donationcontroller', ['ngroute']); donationmodule.config(['$routeprovider', donationconfig]);
and here donationconfig
var donationconfig = function ($routeprovider) { $routeprovider.when('/donor/donation', { resolve: { resolveddata: 'donationcontrollerresolver' }, controller: 'donationcontroller', templateurl: 'js/donor/donation/donation.html' }); }; module.exports = donationconfig;
the $routeprovider
in donationconfig
looking route /donor/donation
, when go http://localhost:5000/donor/donation
, cannot /donor/donation
. how route off module? there no other routes defined app, missing?
the problem angular
looking #
in route. when went http://localhost:5000#donor/donation
worked supposed work.
Comments
Post a Comment