Created
October 15, 2015 10:52
-
-
Save anaumov/ba1afec4234ca848ba43 to your computer and use it in GitHub Desktop.
Инлайн редактирование
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-repeat="tour in tours"> | |
<h1 ng-show="tour.state=='view'">{{tour.title}}</h1> | |
<input ng-show="tour.state=='edit'" ng-model="title" /> | |
<button ng-click="editTour(tour)" ng-show="tour.state=='view'">Редактировать</button> | |
<button ng-click="saveTour(tour)" ng-show="tour.state=='edit'">Сохранить</button> | |
<button ng-click="cancelEditing(tour)" ng-show="tour.state=='edit'">Отменить</button> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment