Last active
August 29, 2015 14:17
-
-
Save pinalbhatt/5d7f573a8ca1a1462d5e to your computer and use it in GitHub Desktop.
AngularJS SideWaffle Templates
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
(function () { | |
'use strict'; | |
angular | |
.module('app') | |
.controller('controller2', controller2); | |
controller2.$inject = ['$scope']; | |
function controller2($scope) { | |
$scope.title = 'controller2'; | |
init(); | |
function init() { } | |
} | |
})(); |
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
(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() { } | |
} | |
})(); |
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
(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) { | |
} | |
} | |
})(); |
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
(function () { | |
'use strict'; | |
angular | |
.module('app') | |
.factory('factory1', factory1); | |
factory1.$inject = ['$http']; | |
function factory1($http) { | |
var service = { | |
getData: getData | |
}; | |
return service; | |
function getData() { } | |
} | |
})(); |
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
(function () { | |
'use strict'; | |
angular.module('app1', [ ]); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment