angular.module('app',['ngSvgStylingMap']).controller('AppController',['$scope','$timeout',function($scope,$timeout){$scope.props={}varstart=function(){$scope.init={'#br path': {fill: '#F9EDBE',stroke: 'black'},'#br text': {fill: 'black',stroke: 'black'}}}start()$scope.changeProps=function(){$scope.props={'#sp path': {fill: '#F0C36D'},'#ms path': {fill: '#F0C36D'}}}$scope.events={'.estado': ['click'],'#pr': ['click'],'#rs': ['click']}$scope.event=function(name,element,selector){// Example of native application// element.style.fill = 'red'// Example of props application// Because i assigned #br propertyif(selector=='.estado'){// Do somethind in parent context$scope.props[selector+' path']={fill: '#FFF'}$scope.props['#'+element.parentNode.id+' path']={fill: '#F0C36D'}// You may need to use the $apply method$scope.$apply()}else{$scope.props['#'+element.parentNode.id+' path']={fill: '#F0C36D'}// You may need to use the $apply method$scope.$digest()}}$timeout(function(){$scope.props={'#pr path': {fill: '#F0C36D'}}},2500)$timeout(function(){$scope.props={'#sp path': {fill: '#F0C36D'},'#sc path': {fill: '#F0C36D'}}},5000)}])