Hello, I'm currently facing an issue with setting up my child controller. I have developed two modules - one for managing directives and controllers, and another for handling Gmail functionalities.
//js file
1 var gmailMod = angular.module('gmailMod', []);
gmailMod.controller('gmailCtrl',function gmailCtrl(gmailFactory){
this.authorize = function(){
console.log("clicking");
//gmailFactory.gmailAuthorize();
}
});
//jsFile2
var emailModule = angular.module('emailMod', ['ui.bootstrap']);
I also have a third file called config that specifies the dependencies
angular.module('seamysApp', ['ngRoute', 'emailMod', 'gmailMod'])
While the email Mod functions correctly, I'm encountering a problem when trying to declare a child controller on a button form the gmailMod
<div ng-controller="gmailCtrl">
<button ng-click="authorize()" class="btn-info" >Not authorized yet! Click here! :)</button>
</div>
Unfortunately, the authorize function doesn't seem to work as expected. Despite not receiving any errors in the console, I suspect there might be a logical error on my part that is difficult to identify. Any insights on why this could be happening? Thank you for your assistance.