本文整理汇总了TypeScript中angular.ILocationService类的典型用法代码示例。如果您正苦于以下问题:TypeScript ILocationService类的具体用法?TypeScript ILocationService怎么用?TypeScript ILocationService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ILocationService类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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
}
});
});
示例2:
this.$timeout(() => {
this.$location.url(url);
// some state changes should not trigger new browser history
if (state.location.replace) {
this.$location.replace();
}
});
示例3: it
it("should route to meetingform page", () => {
$location.path("/page/meetings");
baseMeeting.addNewMeeting();
expect($location.path()).toEqual("/page/meetingform");
});
示例4: 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({});
});
示例5: updateLocation
this.$rootScope.$on('$routeChangeSuccess', (evt, data) => {
store.dispatch(
updateLocation({
path: this.$location.path(),
query: this.$location.search(),
routeParams: this.$route.current.params,
})
);
});
示例6: if
this.$timeout(() => {
const params = this.$location.search();
if (interval) {
params.refresh = interval;
this.$location.search(params);
} else if (params.refresh) {
delete params.refresh;
this.$location.search(params);
}
});
示例7: 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});
});