Files
codeql/javascript/ql/test/library-tests/frameworks/AngularJS/linkFunctions/tst.js
2018-08-02 17:53:23 +01:00

51 lines
1.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Adapted from the AngularJS Developer Guide (https://docs.angularjs.org/guide),
// which is licensed under the MIT license; see file LICENSE in parent directory.
angular
.module('docsBindExample', [])
.controller('ExampleController', ['$scope', function($scope) {
$scope.name = 'Max Karl Ernst Ludwig Planck (April 23, 1858 October 4, 1947)';
}]);
window.angular.module('someOtherModule', ['docBindExample']);
angular.module('heroApp').component('heroDetail', {
templateUrl: 'heroDetail.html',
bindings: {
hero: '='
}
});
function f() {
let m = angular.module('m', []);
m.directive('d1', function() {
return {
link: function postLink() {}
};
});
m.directive('d2', function() {
return {
link: {
pre: function preLink() {},
post: function postLink() {}
}
};
});
m.directive('d3', function() {
return {
compile: function() {
return function postLink() {};
}
};
});
m.directive('d4', function() {
return {
compile: function() {
return {
pre: function preLink() {},
post: function postLink() {}
};
}
};
});
}