另一个模块的控制器不工作

时间:2016-07-28 13:50:19

标签: javascript angularjs ng-controller

嘿所以我在试图让我的孩子控制器工作时遇到了问题。基本上我总共创建了2个模块。 1用于处理我的指令和控制器,另一个用于处理我的gmail方面。

//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']);

我有第三个名为config的文件,用于声明依赖项

angular.module('seamysApp', ['ngRoute', 'emailMod', 'gmailMod'])

所以无论如何,电子邮件Mod完美无缺,但是当我尝试在我的按钮表单上声明一个子控制器gmailMod

<div ng-controller="gmailCtrl">
  <button ng-click="authorize()" class="btn-info" >Not authorized yet! Click here! :)</button>
</div>

没有任何作用。我无法使授权功能起作用。为什么这种事发生有人知道吗?我在我的控制台中没有出现任何错误,所以我认为这一定是我的逻辑错误,而且很难找到。在此先感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

PS C:\pyethereum\ethash-master> python setup.py install running install running build running build_ext building 'pyethash' extension C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tcsrc/python/core.c /Fobuild\temp.win-amd64-2.7\Release\src/python/core.obj -Isrc/ -std=gnu99 -Wallcl : Command line warning D9002 : ignoring unknown option '-std=gnu99'core.c c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(81) : warning C4820: 'PreAttribute' : '4' bytes padding added after data member 'Access' c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(96) : warning C4820: .... .... c:\python27\include\import.h(61) : warning C4820: '_frozen' : '4' bytes padding added after data member 'size' c:\python27\include\code.h(26) : warning C4820: '<unnamed-tag>' : '4' bytes padding added after data member 'co_firstlineno'src/python/core.c(2) : fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\BIN\\amd64\\cl.exe' failed with exit status 2