title: AngularJS: url parameters for routing
body: <p>I would like to use <strong>url parameters for routing</strong> in angularjs </p>
  
  <p>I have an anguar app with 2 views : 
  editView and mainView</p>
  
  <p>Given a url that looks like this:
  'httx://myapp/?param1=x&amp;...<strong>&amp;editmode=1</strong>&amp;...'</p>
  
  <p>-> will get me to the /editMode Path</p>
  
  <p><em>What would be a good way to do so?</em></p>
  
  <ul>
  <li>would i need to use a controller to get the $routeparams.editmode and use the $location.path('/editmode') if editmode == 1 ?</li>
  <li><p>do i need html5 mode?</p></li>
  <li><p>There is nothing i can do about the url - i am forced to use the editmode parameter</p></li>
  </ul>
  
  <hr>
  
  <pre><code>$routeProvider.when('/', {
    controller: function($routeParams, $location) {
      if($routeParams.editmode == '1') {
        $location.path('editMode') ...
  </code></pre>