当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ILocationService.path方法代码示例

本文整理汇总了TypeScript中angular.ILocationService.path方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ILocationService.path方法的具体用法?TypeScript ILocationService.path怎么用?TypeScript ILocationService.path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在angular.ILocationService的用法示例。


在下文中一共展示了ILocationService.path方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

        it("should open the servmeetingform page with correct meeting data", () => {
            $location.path("/page/servmeet");
            ctrl.sharedRouteParamsService.resetRouteProperties();

            const testServiceMeeting: IEvent = _.clone(TestServiceMeeting);

            ctrl.copyMeeting(testServiceMeeting);

            expect($location.path()).toEqual("/page/servmeetform");
            expect(ctrl.sharedRouteParamsService.sharedInfo).toEqual({
                event: {
                    CAEventsID: 11,
                    EventNum: null,
                    Revision: null,
                    PreTitle: "London Area",
                    Title: "Area Service Committee Meeting",
                    StartDate: moment("2028-02-27 19:00:00"),
                    EndDate: moment("2028-02-27 21:00:00"),
                    Address1: "Hinde St Methodist Church",
                    Address2: "19 Thayer Street",
                    Address3: null,
                    City: "London",
                    Postcode: "W1U 2QJ",
                    Details: null,
                    FlyerName: null,
                    ThumbnailName: null,
                    TransDate: "2018-03-19T20:13:10",
                    UserName: "testtestcom",
                    EventStatus: "ACTIVE",
                    trustedDetails: null,
                    IsService: true,
                    IgnoreTime: false
                }
            });
        });
开发者ID:disco-funk,项目名称:ca-london-angular,代码行数:35,代码来源:service-meetings-list.controller.spec.ts

示例2: it

        it("should route to meetingform page", () => {
            $location.path("/page/meetings");

            baseMeeting.addNewMeeting();

            expect($location.path()).toEqual("/page/meetingform");
        });
开发者ID:disco-funk,项目名称:ca-london-angular,代码行数:7,代码来源:base-meeting.controller.spec.ts

示例3: it

            it("should open the pageeditform page", () => {
                $location.path("/page/pageeditor");
                ctrl.sharedRouteParamsService.resetRouteProperties();

                ctrl.newPage();

                expect($location.path()).toEqual("/page/pageeditform");
                expect(ctrl.sharedRouteParamsService.sharedInfo).toEqual({});
            });
开发者ID:disco-funk,项目名称:ca-london-angular,代码行数:9,代码来源:page-editor.controller.spec.ts

示例4: it

        it("should route to meetingform page", () => {
            $location.path("/page/meetingedit");
            ctrl.sharedRouteParamsService.resetRouteProperties();

            initController();

            ctrl.editMeeting({MeetingNum: 123, Revision: 2});

            expect($location.path()).toEqual("/page/meetingform");
            expect(ctrl.sharedRouteParamsService.sharedInfo).toEqual({meetingNum: 123, revision: 2});
        });
开发者ID:disco-funk,项目名称:ca-london-angular,代码行数:11,代码来源:meeting-editor.controller.spec.ts

示例5: it

        it("should show error message when response is bad", () => {
            spyOn(pageEditorService, "postPage").and.callFake(() => {
                const deferred: IDeferred<any> = $q.defer();
                deferred.reject();
                return deferred.promise;
            });

            ctrl.editor = TestPageWithContent;
            ctrl.editor.PageContent = "<div>new content</div>";

            ctrl.submit();

            expect(pageEditorService.postPage).toHaveBeenCalledWith("read-andallo", 3, {
                PageTitle: "...And All Other Mind Altering Substances",
                PageContent: "<div>new content</div>",
                Status: "ACTIVE",
                ContentType: "R",
                ImageFilename: "PAMPHLETS_All_Other"
            });

            $scope.$digest();

            expect(alertModalService.show).toHaveBeenCalledWith({
                style: "danger",
                title: "Failed to save changes",
                message: "Could not save changes due to an unknown error. Please try again later."
            });
            expect($location.path()).toEqual("/page/pageeditform");
        });
开发者ID:disco-funk,项目名称:ca-london-angular,代码行数:29,代码来源:page-editor-form.controller.spec.ts

示例6: it

        it("should remove the auth cookie if logout page is visited", () => {
            $location.path("/page/logout");

            $rootScope.$digest();

            expect(session.removeAuthCookie).toHaveBeenCalled();
        });
开发者ID:disco-funk,项目名称:ca-london-angular,代码行数:7,代码来源:load-template-cache.run.spec.ts


注:本文中的angular.ILocationService.path方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。