Created
April 16, 2018 09:10
-
-
Save goofmint/3c4cb5b1854cf3839cc3d0e96019dc35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ons-page id="tab1main"> | |
<p style="text-align: center;"> | |
<p>ここはメインページです。</p> | |
<p> | |
<ons-input id="message" modifier="underbar" placeholder="メッセージ" float></ons-input> | |
</p> | |
<ons-button class="btn" modifier="large">詳細画面に移動</ons-button> | |
</p> | |
<script> | |
ons.getScriptPage().onInit = function() { | |
const tab1MainController = { | |
__name: 'Tab1MainController', | |
'.btn click'() { | |
this.trigger('changeTitle', { | |
back: true, | |
title: '詳細' | |
}); | |
$('#tab1nav')[0].pushPage('tab1-detail.html', { | |
message: this.$find('#message').val() | |
}); | |
} | |
}; | |
h5.core.controller('#tab1main', tab1MainController); | |
} | |
</script> | |
</ons-page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment