Update edge-swapper with state switching example

Added example code for the use of "ui-view" and switching states.