Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <html ng-app="ionicApp">
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

    <title>Issue with Side Menus</title>

    <link href="//" rel="stylesheet">
    <script src="//"></script>

  <!--<body ng-controller="MainCtrl">-->
  <body ng-app="ionicApp">

    <ion-side-menus enable-menu-with-back-views="false">
            <ion-nav-bar class="bar-stable">
                <ion-nav-buttons side="left">
                    <button class="button button-icon button-clear ion-navicon" menu-toggle="left"></button>
        <ion-side-menu side="left">
            <ion-header-bar class="bar-stable">
                <div class="title">Menu</div>
            <ion-content padding="false" class="side-menu-left has-header">
                    <ion-item menu-close="" ui-sref="tabsController.startingPage">Starting page</ion-item>
                    <ion-item menu-close="" ui-sref="account">My Account</ion-item>
                    <ion-item menu-close="" ui-sref="about">About</ion-item>

    <script id="templates/tabsController.html" type="text/ng-template">
      <ion-view title="Tabs Controller Title">
    <ion-tabs id="tabsController-tabs1" class="tabs-stable tabs-icon-top">
        <ion-tab id="tabsController-tab1" title="Today" icon="ion-calendar" href="#/page1/start">
            <ion-nav-view name="tab1"></ion-nav-view>
        <ion-tab id="tabsController-tab2" title="Weekplan" icon="ion-calendar" href="#/page1/weekplan">
            <ion-nav-view name="tab2"></ion-nav-view>
    <script id="templates/startingPage.html" type="text/ng-template">
      <ion-view title="App Starting Page">
    <ion-content class="has-header" padding="true">
        <p>Starting page here. Please switch on the console in codepen.</p>
        <button class="button button-positive" ng-click="showAbout()">1) Go to the About page with this button via a function</button>
        <p>2) After coming back from the About page, use the side menu to go to the 'My Account' page.</p>

    <script id="templates/about.html" type="text/ng-template">
      <ion-view title="About">
    <ion-content class="has-header" padding="true">
        <p>This is the About page. Go back to the starting page using the side menu item 'Starting page'.</p>

    <script id="templates/account.html" type="text/ng-template">
      <ion-view title="My Account">
    <ion-content class="has-header" padding="true">
        <p>My Account. Go back to the starting page using the button below (or the side menu again, doesn't matter) and observe the error in the console, and also see that the title displayed above will still be 'My Account'.</p>
        <a class="button button-positive" ui-sref="tabsController.startingPage">Back to starting page</a>

    <script id="templates/weekplan.html" type="text/ng-template">
      <ion-view title="Week Plan">
    <ion-content class="has-header" padding="true"></ion-content>


                body {
  cursor: url(''), auto;


                angular.module('ionicApp', ['ionic'])

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

    .state('tabsController.startingPage', {
    url: '/start',
    views: {
      'tab1': {
        templateUrl: 'templates/startingPage.html',
        controller: 'startingPageCtrl'

  .state('tabsController.weekplan', {
    url: '/weekplan',
    views: {
      'tab2': {
        templateUrl: 'templates/weekplan.html',
        controller: 'weekplanCtrl'

  .state('tabsController', {
    url: '/page1',
    templateUrl: 'templates/tabsController.html',

  .state('about', {
    url: '/about',
    templateUrl: 'templates/about.html',
    controller: 'aboutCtrl'
  .state('account', {
    url: '/account',
    templateUrl: 'templates/account.html',
    controller: 'accountCtrl'


.controller('startingPageCtrl', ['$scope', '$state', '$stateParams', 
function ($scope, $state, $stateParams) {
    $scope.showAbout = function () {
        // note: in the real project, I'm using an ID here to show a detail page:
        // $state.go('detailview', {id: idToShow});

.controller('weekplanCtrl', ['$scope', '$stateParams', 
function ($scope, $stateParams) {
  // not important here
.controller('friendsCtrl', ['$scope', '$stateParams', 
function ($scope, $stateParams) {
  // not important here
.controller('aboutCtrl', ['$scope', '$stateParams', 
function ($scope, $stateParams) {
  // not important here

.controller('accountCtrl', ['$scope', '$stateParams', 
function ($scope, $stateParams) {
  // not important here