it("should make a string more exciting", inject(function ($controller, $rootScope) {
var controller =
$controller('MainCtrl', {
$scope: $rootScope.$new(),
})
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.
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