本文整理汇总了TypeScript中app/core/utils/url.toUrlParams函数的典型用法代码示例。如果您正苦于以下问题:TypeScript toUrlParams函数的具体用法?TypeScript toUrlParams怎么用?TypeScript toUrlParams使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了toUrlParams函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: currentUrl
.views(self => ({
get currentUrl() {
let path = self.path;
if (self.query.size) {
path += '?' + toUrlParams(toJS(self.query));
}
return path;
},
}))
示例2: next
next() {
this.$timeout.cancel(this.cancelPromise);
const playedAllDashboards = this.index > this.dashboards.length - 1;
if (playedAllDashboards) {
window.location.href = this.startUrl;
return;
}
const dash = this.dashboards[this.index];
const queryParams = this.$location.search();
const filteredParams = _.pickBy(queryParams, value => value !== null);
this.$location.url('dashboard/' + dash.uri + '?' + toUrlParams(filteredParams));
this.index++;
this.cancelPromise = this.$timeout(() => this.next(), this.interval);
}