I have the three model attributes year, indicator, geography that controls the rendering of a data visualization.
Depending on what is changed in this model, I want to be able to control the rendering of the visualization:
//Pseudo code
watch function ( year, indicator, geography ) {
if(geography.previous == a && geography.current == b){
renderA()
}
if(geography.previous == a && year == 1950){
renderB()
}
}
As the above example demonstrates, I want to be able to compare a previous value to a current and any combination of model changes to determine the rendering.
How would I set this up in Angular?
(possibly including a service for the model and watching multiple attributes ...)