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: 
Don't really know why, I was just playing around with the code, but seems working, at least with the text fields, using `ng-if` instead of `ng-show`/`ng-hide`: <http://jsfiddle.net/T6rA9/1/>

I'll update my answer if I find a reason...

**Update**: I think this is what you're looking for: <http://jsfiddle.net/T6rA9/7/>

The difference is that instead of saving the value on save, I am reverting the changes on cancel, which is easier due to angular two-way data-binding.

Because of that, I also removed the view.editableValue `ng-model` directive and used the fields as you would normally do.
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>

```