Question: I have created an application in AngularJS with edit, save and cancel options, but the problem is that when I click the edit I am not getting the value for editing and saving.

The textfield and dropdowns are been provided through `ng-transclude` 

Can anyone please tell me some solution for this

**[DEMO](http://jsfiddle.net/T6rA9/)**

**HTML**

```
<div ng-controller="LocationFormCtrl">
    <h2>Editors</h2>
    <span ng-repeat="location in location">
    <div class="field">
        <strong>State:</strong>
        <div click-to-edit="location.state"><input ng-model="view.editableValue"/></div>
    </div>
    <div class="field">
        <strong>City:</strong>
        <div click-to-edit="location.city"><select ng-model="view.editableValue" ng-options="loc.city for loc in location"></select></div>
    </div>
    <div class="field">
        <strong>Neighbourhood:</strong>
        <div click-to-edit="location.neighbourhood"><input ng-model="view.editableValue"/></div>
    </div>
    <h2>Values</h2>
    <p><strong>State:</strong> {{location.state}}</p>
    <p><strong>City:</strong> {{location.city}}</p>
    <p><strong>Neighbourhood:</strong> {{location.neighbourhood}}</p>
    <hr>
    </span>
</div>

```

Answer: 
Transclusion and isolated scopes does not work the way you may think. You can read more about it here <http://angular-tips.com/blog/2014/03/transclusion-and-scopes/>

If you i.e. make this change you will already see a difference

```
<div click-to-edit="location.state"><input ng-model="location.state"/></div>

```
What about creating ngClick function which add input element inside your div with previous value? 

```
<div class="newInput" ng-show="hidden">
   <label> {{ inputValue }} </label>
</div>

<div class="newInput" ng-show="!hidden">
  <input ng-model="inputValue" />
</div>

```

And main.js file:

```
app.controller('MyCtrl', function($scope) {

  $scope.hidden = true;

  $scope.inputValue = 'Edit me!';

  $scope.addInput = function() {
    $scope.hidden = !$scope.hidden;
  }

});

```

Here you have [Plunker](http://plnkr.co/edit/tq8QGL7cWAcbZh6gqgQj?p=preview)