Skip to content

Commit 213d738

Browse files
authored
Edited example. Added stateTransitionTo() button to view 1 that transitions to view 3 with params. (#60)
1 parent 26354a4 commit 213d738

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

example/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export default angular
8181
<h2>Child View 1</h2>
8282
<button ng-click="stateGo('app.child2')">stateGo View 2</button>
8383
<button ng-click="stateTransitionTo('app.child2')">stateTransitionTo View 2</button>
84+
<button ng-click="stateTransitionTo('app.child3', {id: '4'})">stateTransitionTo View 3, ID: 4</button>
8485
</div>
8586
`
8687
}
@@ -122,6 +123,7 @@ export default angular
122123
template: `
123124
<div class="child-view">
124125
<h2>Child View 3</h2>
126+
<h3>ID: {{router.currentParams.id}}</h3>
125127
<button ng-click="stateGo('app.child3', {id: '1'})">$state.go View 3, ID: 1</button>
126128
<button ng-click="stateGo('app.child3', {id: '2'})">$state.go View 3, ID: 2</button>
127129
<button ng-click="stateGo('app.child3', {id: '3'})">$state.go View 3, ID: 3</button>

0 commit comments

Comments
 (0)