Good night everyone ... I have a problem, I can't decide who will help. I will be grateful.
there is an angular model
var phonecatApp = angular.module('phonecatApp', []); phonecatApp.controller('PhoneListCtrl', function($scope){ $scope.phones = journal }); and the list in which I bring the variable log
<ul> <li ng-repeat="phone in phones"> <p>{{phone.name}}</p> </li> </ul> In the variable log are the master, one of them I need to attach to the order when you click
I NEED AN ELEMENT WITH A CLICK ON THE ELEMENT TO PUT IT INTO A VARIABLE
like this
<ul> <li> <p id="one">Григоривй</p> </li> <li> <p id="two">Андрей</p> </li> </ul> $(document).ready( function () { $("#one").bind("click", addSpectorOne); }); function addSpectorOne () { var a = $('#one').text(); } $(document).ready( function () { $("#two").bind("click", addSpectorTwo); }); function addSpectorTwo () { var a = $('#two').text(); }
<li ng-repeat="doer in $ctrl.doers" ng-click="$ctrl.handlerDoerAppend(item)">- nörbörnën