- This is datatable error not Angular, So you need to check datatable js file included (latest version),
- And then check table structure like no of <th> and no of <td> both must be same,
Enjoy!
<body ng-app="ngToggle">
<div ng-controller="AppCtrl">
<button ng-click="disableClick(1)">Disable ng-click</button>
</div>
</body>
In JS:
angular.module('ngToggle', [])
.controller('AppCtrl',['$scope', function($scope){
$scope.flag = 0;
$scope.disableClick = function(n) {
if (n && n !== $scope.flag) {
$scope.flag = n;
alert("Clicked!");
}
return false;
}
}]);
DEMO
Enjoy!
app.directive('ckEditor', [function () {
return {
require: '?ngModel',
link: function ($scope, elm, attr, ngModel) {
var ck = CKEDITOR.replace(elm[0]);
ck.on('pasteState', function () {
$scope.$apply(function () {
ngModel.$setViewValue(ck.getData());
});
});
ngModel.$render = function (value) {
ck.setData(ngModel.$modelValue);
};
}
};
}])
Enjoy!
Are you on a quest to enhance your photography projects with a touch of nostalgic flair? Look no further than 1980s photo prompts. These car...