Created
December 2, 2013 23:31
-
-
Save noeticpenguin/7761086 to your computer and use it in GitHub Desktop.
directive template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular./** | |
* app Module | |
* | |
* skeleton app module for skeleton directive. | |
*/ | |
var app = angular.module('app', []) | |
.directive('ng', ['', function(){ | |
// Runs during compile | |
return { | |
name: 'modelAndBind', | |
// priority: 1, | |
// terminal: true, | |
// scope: {}, // {} = isolate, true = child, false/undefined = no change | |
controller: function($scope, $element, $attrs, $transclue) { | |
// here we need to determine if we've overridden the field and if so, return the input value | |
// which wil lbe $element.value() | |
// otherwise calculate the sum | |
}, | |
require: 'ngModel', // Array = multiple requires, ? = optional, ^ = check parent elements | |
restrict: 'A', // E = Element, A = Attribute, C = Class, M = Comment | |
// template: '', | |
// templateUrl: '', | |
// replace: true, | |
// transclude: true, | |
// compile: function(tElement, tAttrs, function transclude(function(scope, cloneLinkingFn){ return function linking(scope, elm, attrs){}})), | |
link: function($scope, iElm, iAttrs, controller) { | |
} | |
}; | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment