當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript IRootScopeService.%24new方法代碼示例

本文整理匯總了TypeScript中angular.IRootScopeService.%24new方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript IRootScopeService.%24new方法的具體用法?TypeScript IRootScopeService.%24new怎麽用?TypeScript IRootScopeService.%24new使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在angular.IRootScopeService的用法示例。


在下文中一共展示了IRootScopeService.%24new方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: beforeEach

    beforeEach(angular.mock.inject($injector => {
        $controller = $injector.get("$controller");
        $rootScope = $injector.get("$rootScope");
        $q = $injector.get("$q");
        manageUsersService = $injector.get("ManageUsersService");
        $scope = $rootScope.$new(true);
        alertModalService = $injector.get("AlertModalService");
        $uibModal = $injector.get("$uibModal");

        spyOn($uibModal, "open");
        spyOn(alertModalService, "show");

        testUser = {
            UserName: "testusercom",
            GroupName: "agroup",
            Email: "some@email.com",
            EmailConfirmed: true,
            UserRoles: []
        };

        testUser2 = {
            UserName: "testusercom2",
            GroupName: "agroup2",
            Email: "some2@email.com",
            EmailConfirmed: true,
            UserRoles: []
        };
    }));
開發者ID:disco-funk,項目名稱:ca-london-angular,代碼行數:28,代碼來源:manage-users.controller.spec.ts

示例2: beforeEach

    beforeEach(angular.mock.inject($injector => {
        $controller = $injector.get("$controller");
        $rootScope = $injector.get("$rootScope");
        $scope = $rootScope.$new(true);

        ctrl = $controller("CaPasswordConfirmationCtrl", {
            $scope: $scope
        });

        ctrl.passwordConfirmationForm = {
            $setPristine: () => {},
            $pristine: true,
            $dirty: false,
            $valid: true,
            $invalid: false,
            $submitted: false,
            $error: undefined,
            $name: "fakeform",
            $pending: undefined,
            $addControl: () => {},
            $removeControl: () => {},
            $setValidity: () => {},
            $setDirty: () => {},
            $commitViewValue: () => {},
            $rollbackViewValue: () => {},
            $setSubmitted: () => {},
            $setUntouched: () => {}
        };
    }));
開發者ID:disco-funk,項目名稱:ca-london-angular,代碼行數:29,代碼來源:ca-password-confirmation.controller.spec.ts

示例3: beforeEach

    beforeEach(angular.mock.inject($injector => {
        $controller = $injector.get("$controller");
        $rootScope = $injector.get("$rootScope");
        $compile = $injector.get("$compile");
        $q = $injector.get("$q");
        $scope = $rootScope.$new(true);
        downloadsService = $injector.get("DownloadsService");

        spyOn(downloadsService, "getDownloads").and.callFake(() => {
            const deferred: IDeferred<Array<IDownload>> = $q.defer();
            deferred.resolve(TestDownloads);
            return deferred.promise;
        });

        spyOn(downloadsService, "getCategories").and.callFake(() => {
            const deferred: IDeferred<Array<ICategory>> = $q.defer();
            deferred.resolve(TestCategories);
            return deferred.promise;
        });

        component = angular.element(`<downloads></downloads>`);

        $compile(component)($scope);
        ctrl = component.controller("downloads");
        $scope.$digest();
    }));
開發者ID:disco-funk,項目名稱:ca-london-angular,代碼行數:26,代碼來源:downloads.component.spec.ts

示例4:

 (
   $controller: IControllerService,
   $rootScope: IRootScopeService,
   _$state_: StateService,
   _securityGroupReader_: SecurityGroupReader,
   _confirmationModalService_: ConfirmationModalService,
   _loadBalancerReader_: LoadBalancerReader,
 ) => {
   $scope = $rootScope.$new();
   $state = _$state_;
   const app = ApplicationModelBuilder.createApplicationForTests('app', { key: 'loadBalancers', lazy: true });
   app.loadBalancers.data.push(loadBalancer);
   securityGroupReader = _securityGroupReader_;
   confirmationModalService = _confirmationModalService_;
   loadBalancerReader = _loadBalancerReader_;
   controller = $controller('oracleLoadBalancerDetailCtrl', {
     $scope: $scope,
     loadBalancer: loadBalancer,
     app: app,
     $state: $state,
     securityGroupReader: securityGroupReader,
     loadBalancerReader: loadBalancerReader,
     confirmationModalService: confirmationModalService,
   });
 },
開發者ID:emjburns,項目名稱:deck,代碼行數:25,代碼來源:loadBalancerDetail.controller.spec.ts

示例5: beforeEach

    beforeEach(angular.mock.inject($injector => {
        $controller = $injector.get("$controller");
        $location = $injector.get("$location");
        $rootScope = $injector.get("$rootScope");
        $location = $injector.get("$location");
        $q = $injector.get("$q");
        loginService = $injector.get("LoginService");
        alertModalService = $injector.get("AlertModalService");
        $scope = $rootScope.$new(true);
        $cookies = $injector.get("$cookies");
        $localStorage = $injector.get("$localStorage");
        $uibModal = $injector.get("$uibModal");
        caLondonAppConfig = $injector.get("caLondonAppConfig");

        caLondonAppConfig.UI_ENVIRONMENT = "UIDebug";
        caLondonAppConfig.API_URL = "https://myurl.com/";

        $cookies.remove("UIDebugEncodedAuth");
        $localStorage.session = undefined;

        session = $injector.get("SessionService");

        ctrl = $controller("LoginCtrl", {
            $scope: $scope
        });
    }));
開發者ID:disco-funk,項目名稱:ca-london-angular,代碼行數:26,代碼來源:login.controller.spec.ts

示例6: beforeEach

    beforeEach(angular.mock.inject($injector => {
        $controller = $injector.get("$controller");
        $rootScope = $injector.get("$rootScope");
        $scope = $rootScope.$new(true);
        $q = $injector.get("$q");

        pageEditorService = $injector.get("PageEditorService");

        $uibModalInstance = { close: () => {} };

        const caPages: Array<IPageUpdateable> = [{
                PageName: "whoismem",
                ImportType: "Add"
            },
            {
                PageName: "whatisca",
                ImportType: "Add"
            }];
        const isIndividual: boolean = false;

        ctrl = $controller("RepoReloadModalInstanceCtrl", {
            $scope: $scope,
            caPages: caPages,
            isIndividual: isIndividual,
            $uibModalInstance: $uibModalInstance
        });

        spyOn($uibModalInstance, "close");
    }));
開發者ID:disco-funk,項目名稱:ca-london-angular,代碼行數:29,代碼來源:repo-reload-modal-instance.controller.spec.ts

示例7: beforeEach

    beforeEach(angular.mock.inject($injector => {
        $controller = $injector.get("$controller");
        $rootScope = $injector.get("$rootScope");
        $q = $injector.get("$q");
        $scope = $rootScope.$new(true);
        meetingService = $injector.get("MeetingService");

        $uibModalInstance = { close: () => {}, dismiss: () => {} };

        districts = [
            {Area: "AREA1", AreaDescription: "Area 1 Desc", District: "DISTRICT1", DistrictDescription: "District 1 Desc"},
            {Area: "AREA2", AreaDescription: "Area 2 Desc", District: "DISTRICT2", DistrictDescription: "District 2 Desc"},
            {Area: "AREA3", AreaDescription: "Area 3 Desc", District: "DISTRICT3", DistrictDescription: "District 3 Desc"}
        ];

        spyOn($uibModalInstance, "close");
        spyOn(meetingService, "getDistricts").and.callFake(() => {
            const deferred: IDeferred<any> = $q.defer();
            deferred.resolve(districts);
            return deferred.promise;
        });

        ctrl = $controller("DistrictModalInstanceCtrl", {
            $scope: $scope,
            $uibModalInstance: $uibModalInstance
        });
    }));
開發者ID:disco-funk,項目名稱:ca-london-angular,代碼行數:27,代碼來源:district-modal-instance.controller.spec.ts

示例8: beforeEach

    beforeEach(angular.mock.inject($injector => {
        $controller = $injector.get("$controller");
        $rootScope = $injector.get("$rootScope");
        $q = $injector.get("$q");

        downloadsService = $injector.get("DownloadsService");

        $scope = $rootScope.$new(true);

        spyOn(downloadsService, "getDownloads").and.callFake(() => {
            const deferred: IDeferred<Array<IDownload>> = $q.defer();
            deferred.resolve(TestDownloads);
            return deferred.promise;
        });

        spyOn(downloadsService, "getCategories").and.callFake(() => {
            const deferred: IDeferred<Array<string>> = $q.defer();
            deferred.resolve(["Assembly Minutes", "ASC Minutes", "SR14"]);
            return deferred.promise;
        });

        ctrl = $controller("DownloadsCtrl", {
            $scope: $scope
        });
    }));
開發者ID:disco-funk,項目名稱:ca-london-angular,代碼行數:25,代碼來源:downloads.controller.spec.ts

示例9: function

        function () {
          let $scope = $rootScope.$new()

          $scope.data = angular.copy(mockData)
          let ganttElement = $compile('<div gantt data="data"><gantt-tree></gantt-tree></div>')($scope)
          $scope.$digest()
          $timeout.flush()

          // Set the data in tree view ordering
          let orderedData = $scope.data.slice()
          let indices = {}

          angular.forEach($scope.data, function (rowModel, i) {
            if (rowModel.name) {
              indices[rowModel.name] = i
            }
          })

          /*jshint sub:true */
          let configRow = orderedData[indices['Config']]
          let setupRow = orderedData[indices['Setup']]
          let serverRow = orderedData[indices['Server']]

          orderedData[indices['Setup']] = serverRow
          orderedData[indices['Config']] = setupRow
          orderedData[indices['Server']] = configRow
          /*jshint sub:false */

          checkLabels(orderedData, ganttElement)
        }
開發者ID:angular-gantt,項目名稱:angular-gantt,代碼行數:30,代碼來源:plugins.spec.ts

示例10: function

 function () {
   let $scope = $rootScope.$new()
   let ganttElement = $compile('<div gantt></div>')($scope)
   $scope.$digest()
   $timeout.flush()
   checkData([], ganttElement)
 })
開發者ID:angular-gantt,項目名稱:angular-gantt,代碼行數:7,代碼來源:gantt.factory.spec.ts


注:本文中的angular.IRootScopeService.%24new方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。