本文整理汇总了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
}
});
});
开发者ID:disco-funk,项目名称:ca-london-angular,代码行数:35,代码来源:service-meetings-list.controller.spec.ts
示例2:
this.$timeout(() => {
this.$location.url(url);
// some state changes should not trigger new browser history
if (state.location.replace) {
this.$location.replace();
}
});
开发者ID:grafana,项目名称:grafana,代码行数:7,代码来源:bridge_srv.ts
示例3: 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
示例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({});
});
开发者ID:disco-funk,项目名称:ca-london-angular,代码行数:9,代码来源:page-editor.controller.spec.ts
示例5: updateLocation
this.$rootScope.$on('$routeChangeSuccess', (evt, data) => {
store.dispatch(
updateLocation({
path: this.$location.path(),
query: this.$location.search(),
routeParams: this.$route.current.params,
})
);
});
开发者ID:grafana,项目名称:grafana,代码行数:9,代码来源:bridge_srv.ts
示例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);
}
});
开发者ID:grafana,项目名称:grafana,代码行数:10,代码来源:TimeSrv.ts
示例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});
});
开发者ID:disco-funk,项目名称:ca-london-angular,代码行数:11,代码来源:meeting-editor.controller.spec.ts
注:本文中的angular.ILocationService类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论