How can you specify the types of parameters for the directive in AngularJS?
Which type should be used for &
binding?
Refer to ngdoc or jsdoc for an example code.
UPDATE: I am looking for answers to the following questions
* @param {<< What should be included here? >>} parentContextExpression
* @param {<< What should be added here? >>} oneWayParameter
angular.module('app', [])
.directive('exampleDir', exampleDir);
/**
* @ngdoc directive
* @module app
* @name app.directive:exampleDir
* @param {<< What should be included here? >>} parentContextExpression
* @param {<< What should be added here? >>} oneWayParameter
* @param {Object=} twoWayParameter
* @usage
* <example-dir
* parent-context-expression="externalFn()"
* one-way-parameter="parentScopeVariable"
* two-way-parameter="parentScopeObject"
* ></example-dir>
**/
function exampleDir() {
return {
template: '...',
scope: {
parentContextExpression: '&',
oneWayParameter: '@',
twoWayParameter: '='
}
}
}