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">


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

    <script src="//"></script>


    <ion-nav-bar animation="nav-title-slide-ios7" class="bar-positive">
      <ion-nav-back-button class="button-icon ion-arrow-left-c">

    <!-- this is where the content from application is displayed -->

    <script id="home.html" type="text/ng-template">
      <ion-view view-title="Flickr Search">
        <div class="item">
          <label  id="search-input">
            <i class="icon ion-search placeholder-icon"></i>
            <input type="text" placeholder="Search" ng-model="home.query" >
        <div class="item">
          <button class="btn" ng-click="">DO SEARCH</button>

    <script id="flickr-display.html" type="text/ng-template">
      <ion-view view-title="Search Results">
          <!-- The content of the page -->
          <div class="list">
            <!-- use collection-repeat to display content -->
            <ion-item ng-repeat="item in flkr.items">
              <img ng-src={{}}>



                #search-input {
  text-align: center;

#photos {
  margin: auto;

#search-bar {
  background: none;
  position: absolute;
  width: 100%;
  top: 44px;
  height: 40px;
  z-index: 3;
#search-bar .item {
  background: none;
  border: none;
#content {
  top: 44px;
  padding-top: 45px;
  padding-bottom: 20px;


                angular.module('ionicApp', ['ionic', 'ngResource'])
  .config(function($stateProvider, $urlRouterProvider) {

    // Ionic uses AngularUI Router which uses the concept of states
    // Learn more here:
    // Set up the various states which the app can be in.
    // Each state's controller can be found in controllers.js

    // Each tab has its own nav history stack:

      .state('home', {
      url: '/home',
      templateUrl: 'home.html',
      controller: 'HomeCtrl as home'


    .state('flickr-display', {
      url: '/flickr-display:query',
      templateUrl: 'flickr-display.html',
      controller: 'FlickrDisplayCtrl as flkr',
      resolve: {
        ImageData: function($stateParams, Flickr) {

    // if none of the above states are matched, use this as the fallback
  .factory('Flickr', function($resource, $q) {
    var photosPublic = $resource('', {
      format: 'json',
      jsoncallback: 'JSON_CALLBACK'
    }, {
      'load': {
        'method': 'JSONP'

    return {
      search: function(query) {
        var q = $q.defer();
          tags: query
        }, function(resp) {
        }, function(err) {

        return q.promise;
  .controller('HomeCtrl', function($state) {
    var vm = this; = function() {
      $state.go('flickr-display', {
        query: vm.query
  .controller('FlickrDisplayCtrl', function(ImageData) {
    var vm = this;

    vm.items = ImageData.items;