Skip to content

Instantly share code, notes, and snippets.

@pankajparkar
Created March 30, 2019 20:17
Show Gist options
  • Save pankajparkar/20a7fecba387d2669c096b3076078aed to your computer and use it in GitHub Desktop.
Save pankajparkar/20a7fecba387d2669c096b3076078aed to your computer and use it in GitHub Desktop.
Require option in directive API demo.
.directive('myDirective', function () {
return {
restrict: 'AECM',
require: 'ngModel',
link: function (scope, element, attrs, ctrl) {
console.log('ngModelController', ctrl)
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment