javascript - ASP MVC url with angularjs -


I have an index.html framework with an angle in the ASP Web API.

The following route:

  gestionale.config (function ($ route provider, $ location provider) {$ routeProvider.} ('/', {TemplateUrl: 'View / People' , Controller: 'Chief Controller'}). When ('/ rolloli', {templateUrl: 'View / Rolloli html', Controller: 'Rule Controller'})}};  

When I start the project with Visual Studio, it index.html opens at the following url:

  http: // localhost: 49375 / Index .html # /  

More views "People / People HTML" are shown correctly.

1) How do I link to index.html, a Ruoli.html page? I have tried

  & lt; A href = "/ ruoli" & gt;  

but does not work because this page loads

  http: // localhost: 49375 / ruoli  

Instead

  http: // localhost: 49375 / index.html # / ruoli  

You have to place the hashbang before the slash.

Then you set your href attribute in this way:

  & lt; A href = "# / ruoli" & gt;  

This will navigate properly:

  http: // localhost: 49375 / index.html # / ruoli  
< P> See this hashbank routing article / cookbook:


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -