title: Angularjs directives isolated scope + one-way data-binding not working for objects?
body: <p>I have created a custom directive which has two values. first is config object and second is data object. I modify this config and data objects inside my directive which is reflecting it in parent scope. Which is causing me error when I have to use directive multiple times.</p>
  
  <p>I followed <a href="https://umur.io/angularjs-directives-using-isolated-scope-with-attributes/">https://umur.io/angularjs-directives-using-isolated-scope-with-attributes/</a> and I am using isolated scope.</p>
  
  <p>I want one way data binding for objects in isolated scope. Whatever I change in directive function it should not reflect in the parent scope.</p>
  
  <p>below is scope of directive.</p>
  
  <pre><code>scope: {
      config: "&amp;config",
      dataObj: "&amp;dataObj"
  }
  </code></pre>
  
  <p>here is how I access it in the link function of directive</p>
  
  <pre><code>var config = scope.config();
  var dataObj= scope.dataObj();
  </code></pre>
  
  <p>I am assuming that pass by reference is happening here. </p>
  
  <p>I am adding JSbin. check the console the value of object is changing and reflecting in parent scope.</p>
  
  <p><a href="https://jsbin.com/vagowe/edit?html,js,output">https://jsbin.com/vagowe/edit?html,js,output</a></p>