Leaflet for AngualrJS: GeoJSON Repaint

How to repaint a certain GeoJSON field(s).

The way we reset style in layer.on({}) is to use, say with mouseout:

mouseout: function resetHighlight(e) {

geolayer is what we get after initialising geoJSON, but what is this, and where do we grab it outside of onEachFeature function?

Logging all kinds of stuff around out, it turns out to be a single layer object. So, we grab it inside of onEachFeature. Create an object and store the layer information there:

var layers = {};

function onEachFeature (feature, layer) {
    layers[] = layer;

    var geolayer = L.geoJson(
      {style: getCountryStyle}

And when we need to reset the style of certain layer, we only need to find the layer object according to the name we gave it, and then use this to do the job: