backbone.js - How does the AngularJS router work for wildcards and pushstate? -


we investigating migration backbone angular. because of our design, need migrate router. i'd understand how wildcard routing works angular. here example of wildcard routing in backbone:

app.router = backbone.router.extend({       routes: {         '*filter' : 'setfilter'       },       setfilter: function(params) {          //all traffic ends here.  can grab url , go.          var url = this.cdn + "templates/" + params + ".html";          ...       }     }); app.router = new app.router(); backbone.history.start({pushstate: true});  
  1. what angular equivalent wildcard routing?

  2. how angular handle push state? specifically, have way utilize /pushstate urls when browser supports pushstate , automatically roll #pushstate hash urls ie9-

thanks.

1) there not current support regex in angular routing

2)angular automatically handle pushstate if not available in browser automatically fallback hash mode# use below lines

$locationprovider.html5mode(false); $locationprovider.hashprefix('!'); 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -