how to access controller in directive [jasmine]
问题 I am having some difficulty accessing the methods and variables on a directive in order to test it. What am I doing wrong? I have attached my directive and the test file. I did not include my karma conf because I know it is correct and that is not the problem. accountsearch.spec.js <-- this is the file with test cases describe("Account search directive logic tests", function (){ var element,$scope,scope,controller,template beforeEach(module("Common.accountSearch")) beforeEach(inject( function