Skip to content

Instantly share code, notes, and snippets.

Created April 16, 2018 09:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
const appController = {
__name: 'AppController',
_tab1Controller: Tab1Controller,
_tab2Controller: Tab2Controller,
__ready() {
'{rootElement} changeTitle'(context) {
let back = '';
if (context.evArg.back) {
back = `<div class="left">
<ons-back-button id="backButton">Back</ons-back-button>
const outerHTML = ons.createElement(`
<ons-toolbar id="toolbar">
<div class="center">${context.evArg.title}</div>
this.$find('#toolbar').prop('outerHTML', outerHTML.outerHTML);
'#tabbar prechange'() {
this.trigger('changeTitle', {
title: "メイン",
back: false
h5.core.controller('body', appController);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment