SHARE
TWEET
Untitled
a guest
Dec 18th, 2014
197
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- app.module.directive('defaultRowTemplate', function() {
- return {
- scope: {
- rowValue: '=',
- rowKey: '=',
- edit: '&'
- },
- replace: true,
- template: "<div class=\"col-sm-10\" >\n <input type=\"text\" ng-disabled=\"rowKey == 'Id'\" class=\"form-control\" id=\"{{rowKey}}\" ng-value=\"rowValue\">\n</div>",
- link: function($scope, $element, $attrs) {
- return $('input', $element).keyup(function(e) {
- if (e.which === 13) {
- return $scope.edit()($scope.rowKey, $scope.rowValue);
- }
- });
- }
- };
- });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

