LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

  
    
    
    
    Side Menus

    
    
  





      
      
      

      
      









JS
angular.module('starter', ['ionic'])

    .run(function($ionicPlatform) {
        $ionicPlatform.ready(function() {
            if(window.StatusBar) {
                // org.apache.cordova.statusbar required
                StatusBar.styleDefault();
            }
        });
    })

    .config(function($stateProvider, $urlRouterProvider) {
        $stateProvider

            .state('noMenu', {
              "url" : "/noMenu",
              abstract : true,
              templateUrl : "noMenuState.html"
            })
        
            .state("noMenu.simplePage", {
              "url" : "/simplePage",
              views : {
                "noMenuView" : {
                  templateUrl : "simplePage"
                }
              }
            })

        
            .state("noMenu.simplePage2", {
              "url" : "/simplePage2",
              views : {
                "noMenuView" : {
                  templateUrl : "simplePage2"
                }
              }
            })        
            .state('app', {
                url: "/app",
                abstract: true,
                templateUrl: "main.html"
            })


            .state('app.state1', {
                url: "/state1",
                views: {
                    'menuContent' :{
                        templateUrl: "state-1-center.html",
                    },
                    'right-menu' : {
                        templateUrl : "state-1-right.html"
                    }
                }
            })

            .state('app.state2', {
                url: "/state2",
                views: {
                    'menuContent' :{
                        templateUrl: "state-2-center.html"
                    },
                    'right-menu' : {
                        templateUrl : "state-2-right.html"
                    }
                }
            })

        // if none of the above states are matched, use this as the fallback
        $urlRouterProvider.otherwise('/app/state1');
    })

    .controller('MainCtrl', function($scope, $ionicSideMenuDelegate) {
        console.log('MainCtrl');

        $scope.toggleLeft = function() {
            $ionicSideMenuDelegate.toggleLeft();
        };
    })
Host Instantly Drag and Drop Website Builder

 

Description

Also have a left/right side menu.
Term
Mon, 11/27/2017 - 21:46

Related Codes

Pen ID
Pen ID
Pen ID