Skip to content

Instantly share code, notes, and snippets.

@pinalbhatt
Last active August 29, 2015 14:17
Show Gist options
  • Save pinalbhatt/5d7f573a8ca1a1462d5e to your computer and use it in GitHub Desktop.
Save pinalbhatt/5d7f573a8ca1a1462d5e to your computer and use it in GitHub Desktop.
AngularJS SideWaffle Templates
(function () {
'use strict';
angular
.module('app')
.controller('controller2', controller2);
controller2.$inject = ['$scope'];
function controller2($scope) {
$scope.title = 'controller2';
init();
function init() { }
}
})();
(function () {
'use strict';
angular
.module('app')
.controller('controller1', controller1);
controller1.$inject = ['$location'];
function controller1($location) {
/* jshint validthis:true */
var vm = this;
vm.title = 'controller1';
init();
function init() { }
}
})();
(function() {
'use strict';
angular
.module('app')
.directive('directive1', directive1);
directive1.$inject = ['$window'];
function directive1 ($window) {
// Usage:
// <directive1></directive1>
// Creates:
//
var directive = {
link: link,
restrict: 'EA'
};
return directive;
function link(scope, element, attrs) {
}
}
})();
(function () {
'use strict';
angular
.module('app')
.factory('factory1', factory1);
factory1.$inject = ['$http'];
function factory1($http) {
var service = {
getData: getData
};
return service;
function getData() { }
}
})();
(function () {
'use strict';
angular.module('app1', [ ]);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment