Skip to content

Instantly share code, notes, and snippets.

View ganarajpr's full-sized avatar

Ganaraj P R ganarajpr

  • Zoro UK
  • London
View GitHub Profile
var ngSubmitDirective = ngDirective(function(scope, element, attrs) {
element.bind('submit', function() {
return scope.$apply(attrs.ngSubmit);
});
});
<html>
<head>
<title>Hello</title>
</head>
<body></body>
</html>
<div ng-bind="myContent"></div>
<div>{{myContent}}</div>
$scope.myContent = "Hello World";
<div data-bind="text : myContent"></div>
var myContent = ko.observable("Hello World");
$scope.myContent = "Hello You";
myContent("Hello You")
<button data-ng-click="onButtonClick($event,'save')">Save</button>
<button data-ng-click="onButtonClick($event,'cancel')">Cancel</button>