本文整理汇总了TypeScript中ionic-angular.Content类的典型用法代码示例。如果您正苦于以下问题:TypeScript Content类的具体用法?TypeScript Content怎么用?TypeScript Content使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Content类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
this.notificationService.getNotificationListForTop(position, isNeedRegistNotExistsReadStatus, this.keyWord).then((data: any) => {
this.notificationListForTop = data;
this.isLoadCompleted = true;
this.isScrollToTopButtonVisible = false;
if (isRefresh) {
refresher.complete();
}
if (this.isFirstTimeLoad && data.length > 9) {
this.pageContent.scrollTo(0, 46);
this.isShowSearchBar = true;
this.isFirstTimeLoad = false;
}
});
示例2:
medias => {
// if (medias.length > 0) {
this.mediaList = medias;
// this.mediaList = [];
// for (var i = 0; i < medias.length; i++) {
// this.mediaList.push({
// Id: medias.item(i).Id,
// Author: medias.item(i).Author,
// Title: medias.item(i).Title,
// Description: medias.item(i).Description,
// Location: medias.item(i).Location,
// MediaDate: medias.item(i).MediaDate,
// UploadDate: medias.item(i).UploadDate,
// Active: medias.item(i).Active,
// SubCategoryId: medias.item(i).SubCategoryId,
// Downloaded: medias.item(i).Downloaded
// });
// }
// }
// this.mediaList = medias;
this.activeSC == subCategory.Id ? this.activeSC = 0 : this.activeSC = subCategory.Id;
// setTimeout(
// () => {
var pos = this.findPos(event.target);
this.content.scrollTo(pos.left, pos.top - 1, 100);
// }
// , 0);
return this.mediaList;
}
示例3: setTimeout
).subscribe(([section, isFullscreen]) => {
this.content.resize();
// Hack to make it happen after resize is done
setTimeout(() => {
this.calculateOffset(section, isFullscreen);
}, 0);
});
示例4:
(childNodes: TreeNode[]) => {
this.folderItems = {};
// we found all children of the node we're
// traversing to (key)
for (let i in childNodes) {
let childNode: TreeNode = childNodes[i],
childKey: number = childNode[DB_KEY_PATH];
newFolderItems[childKey] = childNode;
} // for
this.folderNode = folderNode;
this.folderItems = newFolderItems;
// resize content, because a change in this.folderNode
// can affect the header's visibility
this.content.resize();
},
示例5: ionViewDidEnter
//Function called once the view is full loaded
ionViewDidEnter() {
//Scroll to the bottom of the messages (Request below is for polling, not getting messages)
this.content.scrollToBottom(this.scrollDuration);
//Grab our user from localstorage
let user = JSON.parse(localStorage.getItem(AppSettings.shushItemName));
//Start polling to get messages
let poll = this.appMessaging.conversationRequestPoll(user.access_token);
//Get a reference to this
let self = this;
this.pollingRequest = poll.subscribe(function(success) {
//Success!
//Stop loading
self.appNotify.stopLoading().then(function() {
//Add our messages/Get our conversation
self.appMessaging.conversations = success;
//Update our conversations
self.updateConversation();
});
}, function(error) {
//Error!
//Stop Loading
self.appNotify.stopLoading().then(function() {
//Pass to Error Handler
self.appNotify.handleError(error, [{
status: 404,
callback: function() {
//Pop back to the All conversations view
self.navCtrl.pop();
}
}]);
});
}, function() {
//Completed
})
}
示例6: setTimeout
setTimeout(() => {
let screenHeight: number = this.maincontent.getNativeElement().clientHeight;
let sizes: PosterPercentageItem[] = [];
for (let i = 0; i < this.tmdbConfig.images.poster_sizes.length; i++) {
let posterSize: string = this.tmdbConfig.images.poster_sizes[i];
let size: number = +posterSize.substring(1, posterSize.length);
let percentage: number = (size / screenHeight) * 100;
if (!isNaN(percentage)) {
sizes.push({ percentage: percentage, posterSize: posterSize, size: size });
}
}
var closestPercentage = findClosest(sizes.map(x => x.percentage), 40);
this.posterWidth = sizes.find(x => x.percentage == closestPercentage).posterSize;
this.imageHeight = this.scrollHeight = screenHeight * 0.4;
}, 0);
示例7: updateConversation
//Function to update our conversation
updateConversation() {
//Find and update our current conversation
for (let i = 0; i < this.appMessaging.conversations.length; ++i) {
if (this.convoId == this.appMessaging.conversations[i]._id) {
//Update the conversation
this.convo = this.appMessaging.conversations[i];
//Break from the loop
i = this.appMessaging.conversations.length;
}
}
//Update the UI
this.changeDetector.detectChanges();
//Scroll to the bottom of the messages
this.content.scrollToBottom(this.scrollDuration);
}
示例8: scrollToBottom
scrollToBottom(){
this.content.scrollToBottom(300);//300ms animation speed
}
示例10:
this._scrollToTopSubscription = this.section$.subscribe(() => {
this.content.scrollToTop();
});