本文整理匯總了TypeScript中ionic-native.InAppBrowser.open方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript InAppBrowser.open方法的具體用法?TypeScript InAppBrowser.open怎麽用?TypeScript InAppBrowser.open使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ionic-native.InAppBrowser
的用法示例。
在下文中一共展示了InAppBrowser.open方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
this.local.get(OPTIONS_KEY_NAME).then((res) => {
let options = JSON.parse(res) || {};
if (options.useInAppBrowser) {
InAppBrowser.open(UUID_URL + item.occurrenceID, "_blank", INAPPBROWSER_OPTIONS);
}
else {
InAppBrowser.open(UUID_URL + item.occurrenceID, "_system");
}
});
示例2: openPage
openPage(page) {
// Reset the content nav to have just this page
// we wouldn't want the back button to show in this scenario
console.log(this.nav);
if(page === 'Ajustes'){
this.nav.push(Ajustes,{
"tit":'Ajustes',
"section":'Ajustes',
"translator":this.translator_object
});
}else if(page.idTypeItem === 1011){
if(this.platform.is('ios')){
InAppBrowser.open('https://itunes.apple.com/in/app/incidencias-velez-malaga/id990970923?mt=8','_system','location=yes');
}else if(this.platform.is('android')){
InAppBrowser.open('https://play.google.com/store/apps/details?id=com.gecor.VelezMalaga','_system','location=yes');
}
}else if(page.idTypeItem === 1015){
this.loading = Loading.create({content:''});
this.nav.present(this.loading);
setTimeout(() =>{
this.nav.push(page.component,{
"tit":this.translator_object[localStorage.getItem('lang')]['SELECCIONA_PLAYA'],
"section":this.pages[0].section,
"index":this.pages[0].idx,
"estados": this.estados,
"idTypeItem": page.idTypeItem,
"translator":this.translator_object,
"loading": this.loading,
"typeItems" : this.typeItems
});
},100)
}else{
this.loading = Loading.create({content:''});
this.nav.present(this.loading);
setTimeout(() =>{
this.nav.push(page.component,{
"tit":page.title,
"section":page.section,
"index":page.idx,
"estados": this.estados,
"idTypeItem": page.idTypeItem,
"translator":this.translator_object,
"loading": this.loading,
"typeItems" : this.typeItems
});
},100)
}
};
示例3: Promise
return new Promise(function(resolve, reject) {
/* Open the URL in app without header information (URL, back/forward buttons, etc.) */
let browserRef = InAppBrowser.open("https://mdash.cs.vassar.edu:443/oauth/authorize?response_type=token&client_id=vassarOMH&redirect_uri=https://mdash.cs.vassar.edu:443/&scope=write_data_points%20read_data_points", "_blank", "location=no");
/* When the browser reloads, check the URL */
browserRef.addEventListener("loadstart", (event) => {
/* If the URL starts this way, we can access the token */
if ((event.url).indexOf("https://mdash.cs.vassar.edu/#") === 0) {
browserRef.removeEventListener("exit", (event) => {});
browserRef.close();
/* Token is located between "=" and "&" */
let token = (event.url).split("=")[1].split("&")[0];
if (token !== null) {
/* Set the token for post requests */
resolve (token);
}
else
reject ("Yeah, that didn't work bud");
}
});
});
示例4: launch
launch(url) {
console.log('call launch function');
console.log(url, typeof(url));
// this.platform.ready().then(() => {
InAppBrowser.open(url, "_blank", "location=no,toolbar=no");
// })
// InAppBrowser.open('http://www.naver.com');
}
示例5: openGitHubSourceUrl
openGitHubSourceUrl(url) {
var githuburl = "https://github.com/osser/ionic2-sample/tree/master/ionic2-basic-beta4/app/pages/" + url;
console.log(githuburl);
InAppBrowser.open(githuburl, "_blank");
}
示例6:
handler: ()=> {
let url = 'https://github.com/angular-ui/ui-router/wiki';
InAppBrowser.open(url, '_blank');
}
示例7: map
map(lat,lon){
InAppBrowser.open("geo:"+lat+","+lon, "_system", "");
}
示例8: mail
mail(mail){
InAppBrowser.open("mailto:"+mail, "_system", "");
}
示例9: sms
sms(number){
InAppBrowser.open("sms:"+number, "_system", "");
}
示例10: call
call(number){
InAppBrowser.open("tel:"+number, "_system", "");
}
示例11:
this.platform.ready().then(() => {
InAppBrowser.open(url, "_system", "location=true");
});
示例12: launch
launch() {
console.info("Launch: ", this.repo.html_url);
InAppBrowser.open(this.repo.html_url, "_blank", "location=no");
}
示例13: goToPage
goToPage() {
let url = 'https://github.com/angular-ui/ui-router/wiki';
InAppBrowser.open(url, '_blank');
}
示例14: clickLinkHandler
private clickLinkHandler(e): void {
e.preventDefault();
InAppBrowser.open(e.target.getAttribute('href'));
}
示例15: ngAfterViewInit
ngAfterViewInit() {
let url = 'http://sseramom.com/?device=mobile';
InAppBrowser.open(url, "_blank", "location=no,toolbar=no");
}