javascript - Angular routing for front end app -


I know that this is a very basic question, but not all can be caught properly - I'm trying Get a handle on front end routing using a Conneri / Sinatra app. My app is not killing the right page, and I'm getting hurt because I do not have any problem, the way I am working on the way Wrap the head if you use the database Are not. > In my home page, "display.html", I have some text, then a group of D3 graphs with href:

  & lt; A href = "/ app / {{appname}}" & gt; & Lt; Div ng-cloak class = "nvd3-bullet-chart2" id = "chart" data = "alltables" showXAxis = "true" showYXx = "true" & gt; & Lt; / Div & gt; & Lt; / A & gt; The charts are populated by looping through NVD3 function instead of repeating ng-repeats (not sure how given issues are with asynchronicity).  

In my display CTRL, I define $ scope.appname as:

  $ scope.appname = '' var getgraphs = function (dataset) {var Statistics = {App: Dataset [0] .pp} $ scope.appname = stats.app; $ Scope.appname = $ routeParams.appname; }   

My angle paths are set as follows:

  app.config (function ($ migration provider) {$ routeProvider // route for display ('/ App /: appname', {templateUrl: 'views / details.html',});});   

When I click on href for charts, I am getting an error that the page was not found on '/ app /', which indicates that: appname is ever Where is it not being raised, then where should it be defined?

I am happy to add more details and code when I need to thank you!

Try adding a hash to your href. & lt; A href = "# / app / {{appname}}" & gt;

If you do not want to havehish in your URL, then you have to setup html5mode in your route settings.

  $ locationProvider.html5Mode (true);    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -