【问题标题】:Ionic Side Bar Menu in MeteorMeteor 中的离子侧栏菜单
【发布时间】:2015-03-13 08:24:57
【问题描述】:

我正在尝试在我的流星应用程序中实现离子侧栏菜单。我知道有一个例子here,但我正在尝试自己重新创建它。我的代码如下:

app.js:

if (Meteor.isClient) {

    var app = angular.module('todo', ['angular-meteor', 'ionic'], function($interpolateProvider) {
       $interpolateProvider.startSymbol('[[');
       $interpolateProvider.endSymbol(']]');
    });


    app.controller("TodoCtrl", ['$scope', '$collection', '$ionicSideMenuDelegate', function ($scope,     $collection, $ionicSideMenuDelegate) {

       $scope.toggleProjects = function () {
          $ionicSideMenuDelegate.toggleLeft();
       };
    }]);

}

index.html:

  <body>
      <div>

        <ion-side-menus>
          <!-- Center content -->
          <ion-side-menu-content>
              <ion-header-bar class="bar-dark">
                <h1 class="title">Todo</h1>
              </ion-header-bar>
              <ion-content>
              </ion-content>
           </ion-side-menu-content>

           <!-- Left menu -->
           <ion-side-menu side="left">
              <ion-header-bar class="bar-dark">
                <h1 class="title">Projects</h1>
              </ion-header-bar>
           </ion-side-menu>

        </ion-side-menus>
    </div>
</body>

代码的输出是这样的:

我正在运行 Meteor 1.0.2.1,我的包是:

我做错了什么?谢谢。

【问题讨论】:

    标签: angularjs meteor ionic


    【解决方案1】:

    我们在这里回答了这个问题:

    https://github.com/Urigo/meteor-ionic/issues/34

    【讨论】:

      【解决方案2】:

      即使在最新版本 1.1 上也可以使用。 只有 urigo:ionic 和 urigo:angular 需要添加流星添加。

      休息如你所愿...

      改变

      打包到:

      meteor-platform
      urigo:ionic
      urigo:angular
      

      和应用引导到:

          Meteor.startup(function ()
          {
            angular.bootstrap(document, ['starter']);
          });
      
      angular.module('starter', ['angular-meteor','ionic'])
      
      .run(['$ionicPlatform',function($ionicPlatform) {
        $ionicPlatform.ready(function() {
          // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
          // for form inputs)
          if(window.cordova && window.cordova.plugins.Keyboard) {
            cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
          }
          if(window.StatusBar) {
            // org.apache.cordova.statusbar required
            StatusBar.styleDefault();
          }
        });
      }]) 
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-12-09
        • 1970-01-01
        • 2016-08-02
        • 2017-02-21
        • 1970-01-01
        • 2019-02-09
        • 2016-12-01
        • 1970-01-01
        相关资源
        最近更新 更多