Currently, I am in the process of creating a test for a directive known as calendar week. During this development, I encountered an angular error that led me to the following link: https://docs.angularjs.org/error/$sce/insecurl?p0=http:%2F%2Fhere.com%2Fviews%2Fdirectives%2FcalendarWeek.html
This is what my spec includes:
describe('Tests for CalendarWeek Directive', function(){
var el, scope, controller;
beforeEach(function() {
module('MyApp');
return inject(function($injector, $compile, $rootScope, $httpBackend, $sce) {
el = angular.element("<div calendar-week></div>");
$compile(el)($rootScope.$new());
$rootScope.$digest();
controller = el.controller("calendarWeek");
$sce.trustAsResourceUrl("http://here.com/views/directives/calendarWeek.html")
$httpBackend.whenGET("http://here.com/views/directives/calendarWeek.html").respond({ hello: 'World' });
Do you have any suggestions or insights on what might be causing this issue?