DeborahK / AngularF2BWebAPI

Files for the "Angular Front to Back With Web API" Pluralsight course by Deborah Kurata.
MIT License
124 stars 228 forks source link

unable to access the controller(typescript & angularjs) in jasmine #13

Closed dileepkumar19 closed 5 years ago

dileepkumar19 commented 6 years ago

angularjs && Typescript Controller

module app.controller { class MainCtrl { static $inject = ['$scope', '$rootScope', '$interval', '$http', 'unityService', 'adalAuthenticationService', '$location', '$window', 'analyticsService', 'homePageSetting', 'unityCommonService', '$timeout', '$cookies', '$routeParams', '$compile', '$filter']; } constructor( private $scope, private $rootScope, private $interval, private $http, private unityService: app.services.unityService, private adalAuthenticationService, private $location, private $window, private analyticsService, private homePageSetting, private unityCommonService, private $timeout, private $cookies, private $routeParams, private $compile, private $filter

    ) { }

angular.module('UnityApp').controller('MainCtrl', MainCtrl); }

Jasmine Test For Controller

beforeEach(function () { angular.module("UnityApp") });

it("should make a string more exciting", inject(function ($controller, $rootScope) { var controller = $controller('MainCtrl', { $scope: $rootScope.$new(), })

}));

i m unable to access the scope in MainCtrl

DeborahK commented 5 years ago

This issue is over a year old. I assume at this point it has been resolved or is no longer relevant. I'm closing this issue. Please reopen if necessary.