how to initialize value inside run block in angular.js
directives.value("value1","test1");
directives.run(function(value1){
value1="test2";
})
Is this possible
If you are using a primitive as the value, you will only get a copy of that injected into the run function and you will not be able to replace the original one.
Use an object instead:
directives.value("value1", { something: "test1" });
directives.run(function(value1){
value1.something = "test2";
})