angularjs - Multiple states on one page with ui-router -
currently investigating possibility configure ui-router following scenario. great, if have idea how achieve this.
i have simple 1 pager layout navigation. each navigation item have div box content. how can define several states on 1 page (for each navigation item 1 state separate controller , template)?
afterwards implement solution, when click on navigation item scroll corresponding div container. made html anchors, how can solve ui-router? or isn't possible , have create 1 state separate views?
below example image show wanted layout:
hopefully have solution that.
thanks in advance,
xynnn
with ui-router can have multiple views on 1 page. able this:
$stateprovider .state('main',{ views: { 'contentsite1': { templateurl: 'site1.html', controller: function($scope){} }, 'contentsite2': { templateurl: 'site2.html', controller: function($scope){} }, 'contentsite3': { templateurl: 'site3.html', controller: function($scope){} }, } });
here link more explanation https://github.com/angular-ui/ui-router/wiki/multiple-named-views
Comments
Post a Comment