Last active
October 21, 2015 11:11
-
-
Save qetr1ck-op/01721016841fc0760acd to your computer and use it in GitHub Desktop.
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
app.controller('MainCtrl', ['$scope', '$timeout', function($scope, $timeout){ | |
$timeout(function() { | |
console.log($scope); | |
}); | |
}]); | |
//another best bractice approach with $inject | |
app.controller('MainCtrl', mainCtrl); | |
mainCtrl.$inject = ['$scope', '$timeout']; | |
function mainCtrl($scope, $timeout) { | |
$timeout(function() { | |
console.log($scope); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment