How do I test the HTML pointed to by the templateUrl of an angular directive?
问题 I have a directive: app/controllers/battle.js angular.module('myModule') .controller('myController', ['$scope', function($scope){ $scope.sayHello = function(){console.log('hello');}; }]) .directive('myDirective', function(){ return { templateUrl: '../views/testView.html' } }); That directive is called as follows: app/views/routeOne.html <my-directive ng-controller='myController'></my-directive> The directive templateUrl points to a file that looks like: app/views/testView.html <div id=