angularjs - Using binding with UI Router -
i working ui-router , have several states defined. on 1 of views have form user can add together 'team' view. have button each team view additional details on team. trying set when click on button team view comes url /#/teams/yankees
example.
i may not looking in right places or know exact term this, have not been able figure out far.
below snippet of have in app.js portion.
app.config( ['$stateprovider','$urlrouterprovider', function($stateprovider, $urlrouterprovider){ $urlrouterprovider.otherwise('/'); .state('teams', { url: '/teams', templateurl: './templates/main/teams.html', controller: 'teamsctrl' }) .state('teams/{{ team.title }}', { url: '/teams/{{ team.title }}', templateurl: './templates/main/team.html', controller: 'topicctrl' })
whenever click on button go /#/teams/yankees
end beingness routed $urlrouterprovider.otherwise('/');
can point me in right direction?
it helpful know links like... using ui-sref? typically url attributes more similar this:
.state('teams/{{ team.title }}', { url: '/teams/:title', templateurl: './templates/main/team.html', controller: 'topicctrl' })
rather {{}}
angularjs angular-ui-router
No comments:
Post a Comment