angularjs - Get Url in Angular1.5 -
it's first time use angular1.5. here's source code.
function config(statehelperprovider, $urlrouterprovider) { statehelperprovider .setnestedstate({ name : 'main.browsejobs', url : '/browse-jobs', params : {keyword : ""}, data : { pagetitle: 'available jobs aditjobs', mastheadclass: 'browse-jobs' }, children : { name: 'index', url: '/', templateurl: '/par' }, views : { '': { templateurl : 'components/browse-jobs/views/browse-jobs.view.html', controller : "browsejobscontroller", controlleras: 'vm', resolve: { jobfilters: jobfilters, jobposts : jobposts, applyjob : applyjob, jobpostspagination: jobpostspagination, locationfilters: locationfilters } }, // 'testimonial@main.home': { // templateurl : 'components/home/views/testimonial.view.html', // } } }) $urlrouterprovider .otherwise('/404') }
i wanna url 'aditjobs/aaa' (for example) , think should use params in setnestedstate function doesn't work. how can this?
i mixed something. url : '/browse-jobs/:jobid', can that.
wiki
Comments
Post a Comment