I'm currently developing a custom plugin for bootstrapping my Angular application manually, using the document as the root. I want to attach a controller to my root without utilizing the ng-controller directive in order to create a global controller effect. Here's what I have in mind:
var myCtrl = function($scope) {
// Controller code goes here
};
var app = angular.module('app',[]).
config(['$controlProvider',function($controlProvider)
{
// Attach the controller to the rootScope/ document
$controlProvider.register('myCtrl',['$scope',myCtrl]);
}]);
angular.bootstrap(document,['app']);
If you provide an answer, please consider mentioning $scope.keys = { ... }. Additionally, explain its relevance to the response.