Skip to content

Instantly share code, notes, and snippets.

@iambigd
Created August 8, 2014 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iambigd/15b4276e72ddd29f15ff to your computer and use it in GitHub Desktop.
Save iambigd/15b4276e72ddd29f15ff to your computer and use it in GitHub Desktop.
var myApp = angular.module('myApp', []);
myApp.factory('aProvider', function() {
console.log("factory");
});
myApp.directive("test1", function() {
console.log("directive setup");
return {
compile: function() {console.log("directive compile");}
}
});
myApp.directive("test2", function() {
return {
link: function() {console.log("directive link");}
}
});
myApp.run(function() {
console.log("app run");
});
myApp.config( function() {
console.log("app config");
});
myApp.controller('myCtrl', function($scope) {
console.log("app controller");
});
<div ng-app="myApp" ng-controller="myCtrl">
<div test1 test2> </div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment