Angular ui-router setup for this use case? -


I want to redo a line in the line chart without reloading it (neither the template nor Neither the controller) can be done with country / 5 country / 7 this UI-router while navigating completely?

state

  country /: id   

template with directive - country.html < pre> & lt; Linechart data = "Scope.Database" & gt;

Controller

  onStateParamsChange = & gt; Fetch data, set scope Some data    

For today, there is no official support what you are looking for UI Router Speaking is considered as 'dynamic parameter' However, if you check and help us by testing feedback, then it will be merged to master soon.

Set your route / state as follows:

  $ StateProvider.state ("country", {url: "/ country / {id: int}", parameter : {Id: {dynamic: true}} / * other state configuration *);   

Then, in your controller, you can see the changes in id :

  $ stateParam $ ("Id", function (value) is the updated value of $ // val $$ Parsam.id // This is where you can make your argument to get new data and update $ scope) ;    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -