javascript - Edit specific div's using AngularJS -
How can I edit the coal using a specific div? There is a problem with the Divs on my page, which includes tabulars with data. When I click on an edit button on a specific div, I want it to be editable.
How can I tie the click event in that special device? I've done something like this now:
& lt; Div ng-show = "summary.abbData.service_type == 'name'" class = "col-md-6" style = "background-colour: #ffffff; width: 325px; margin-left: 15px;" & gt; & Lt; H5 class = "bg-primary rmpad15" style = "margin-top: 1px; padding: 5px;" & Gt; {{Summary.abbData.service_type}} & lt; Button type = "button" ng-click = "editAbb (customer.id)" class = "btn btn-default btn-x" style = "float: right; margin-top: -3px;" & gt; Spine class = "glyphin glyphine-pencil" & gt; & Lt; / Time & gt; & Lt; / Button & gt; & Lt; / H5> & Lt; Table class = "table-table-condensed pad 1" & gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Strong> Hastighet & lt; / Strong> & Lt; / TD & gt; & Lt; TD & gt; {{Summary.abbData.service}} & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Strong> LÃghenhetsnr & lt; / Strong> & Lt; / TD & gt; & Lt; TD & gt; {{Summary.abbData.apartment}} & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Strong> I nadsavgift & lt; / Strong> & Lt; / TD & gt; & Lt; TD & gt; {{Summary.abbData.month_fee}} kr & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Strong> Anslutningsavgift & lt; / Strong> & Lt; / TD & gt; & Lt; TD & gt; {{Summary.abbData.conn_fee}} kr & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Strong> Bindningstid & lt; / Strong> & Lt; / TD & gt; & Lt; TD & gt; {{Summary.abbData.fixation}} Mother ¥ n & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Strong> Registreringsdatum & lt; / Strong> & Lt; / TD & gt; & Lt; TD & gt; {{Summary.abbData.reg_date}} & lt; / TD & gt; & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; & Lt; / Div & gt; As you can see, I have ng-click, but I do not know how to bind devail to click event. anyone?
please see here
& lt; Tr & gt; & Lt; TD & gt; & Lt; Strong> LÃghenhetsnr & lt; / Strong> & Lt; / TD & gt; & Lt; TD & gt; & Lt; Span ng-hide = "edit.apartment" & gt; {{Summary.abbData.apartment}} & lt; / Span & gt; & Lt; Input ng-model = "summary.abbData.apartment" type = "text" ng-show = "edit advert" /> & Lt; / TD & gt; & Lt; TD & gt; & Lt; Button ng-click = "edit.apartment =! Edit.apartment" & gt; & Lt; Span ng-show = "! Edit.apartment" & gt; Edit & lt; / Span & gt; & Lt; Span ng-show = "edit.apartment" & gt; Save & lt; / Span & gt; & Lt; / Button & gt; & Lt; / TR & gt;
Comments
Post a Comment