I am having two controllers -
Parent Controller
dashboardApp.controller("parentController", ['$scope', function($scope){
$scope.rootRules = {blackRule: "", blueRule: "", greenRule: "", yellowRule: "", orangeRule: "", redRule: ""};
So as you can see it has a variable called rootRules which I am updating in the child controller as -
Child Controller
var color = $scope.color + "Rule";
$scope.rootRules[color] = ruleString;
console.log($scope.rootRules);
So it works when rootRules
is having ""
for that color however when the rootRules
have some string stored in it for that color then I am unable to see the updates on screen for this code. Please let me know if full code required.
Thanks in advance.