├── .agignore ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .jscs.json ├── .jshintignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── README_OLD.md ├── bower.json ├── circle.yml ├── component.json ├── config ├── CODENAMES ├── DISCOURSE_POST_URL ├── build.config.js ├── demos │ ├── demos.config.js │ ├── processors │ │ └── demos.js │ ├── static-site │ │ ├── file-readers │ │ │ └── yaml.js │ │ ├── index.js │ │ └── spec │ │ │ └── file-readers │ │ │ ├── _test-data │ │ │ ├── long-header.md │ │ │ ├── markdown-title.md │ │ │ ├── no-closing-header.md │ │ │ ├── no-header.md │ │ │ └── normal-header.md │ │ │ └── yaml.spec.js │ └── templates │ │ ├── app.template.js │ │ ├── asset.contents.template │ │ ├── index.template.html │ │ ├── pages-data.template.js │ │ └── scenario.template.js ├── docs │ ├── README.md │ ├── docs.config.js │ ├── filters │ │ └── capital.js │ ├── generate-versions.js │ ├── ignore.words │ ├── inline-tag-defs │ │ └── link.js │ ├── processors │ │ ├── index-page.js │ │ ├── jekyll.js │ │ ├── latest-version.js │ │ └── version-data.js │ ├── tag-defs │ │ └── index.js │ └── templates │ │ ├── api │ │ ├── api.template.html │ │ ├── componentGroup.template.html │ │ ├── controller.template.html │ │ ├── directive.template.html │ │ ├── filter.template.html │ │ ├── function.template.html │ │ ├── object.template.html │ │ ├── page.template.html │ │ ├── provider.template.html │ │ ├── service.template.html │ │ ├── type.template.html │ │ └── utility.template.html │ │ ├── api_index.template.html │ │ ├── api_menu.template.html │ │ ├── api_menu_version.template.html │ │ ├── api_version_select.template.html │ │ └── lib │ │ ├── events.template.html │ │ ├── macros.html │ │ ├── methods.template.html │ │ ├── properties.template.html │ │ ├── returns.template.html │ │ ├── this.template.html │ │ └── yaml.template.html ├── gulp-tasks │ ├── docs.js │ └── test.js ├── karma-sauce.conf.js ├── karma.conf.js ├── lib │ ├── fonts │ │ ├── ionicons.eot │ │ ├── ionicons.svg │ │ ├── ionicons.ttf │ │ └── ionicons.woff │ ├── ionic-snapshot.js │ ├── js │ │ ├── angular-ui │ │ │ ├── angular-ui-router.js │ │ │ └── angular-ui-router.min.js │ │ └── angular │ │ │ ├── angular-animate.js │ │ │ ├── angular-animate.min.js │ │ │ ├── angular-animate.min.js.map │ │ │ ├── angular-aria.js │ │ │ ├── angular-aria.min.js │ │ │ ├── angular-aria.min.js.map │ │ │ ├── angular-messages.js │ │ │ ├── angular-messages.min.js │ │ │ ├── angular-messages.min.js.map │ │ │ ├── angular-mocks.js │ │ │ ├── angular-resource.js │ │ │ ├── angular-resource.min.js │ │ │ ├── angular-resource.min.js.map │ │ │ ├── angular-sanitize.js │ │ │ ├── angular-sanitize.min.js │ │ │ ├── angular-sanitize.min.js.map │ │ │ ├── angular-scenario.js │ │ │ ├── angular.js │ │ │ ├── angular.min.js │ │ │ ├── angular.min.js.map │ │ │ ├── errors.json │ │ │ ├── version.json │ │ │ └── version.txt │ └── testutil.js ├── protractor-sauce.conf.js ├── protractor.conf.js └── version.template.json ├── demos ├── directive │ ├── checkbox │ │ └── simple │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── test.scenario.js │ ├── collectionRepeat │ │ └── contacts │ │ │ ├── contacts.html │ │ │ ├── contacts.js │ │ │ └── test.scenario.js │ ├── footer │ │ └── simple │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── test.scenario.js │ ├── header │ │ └── simple │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── test.scenario.js │ ├── infiniteScroll │ │ └── forever │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── test.scenario.js │ ├── list │ │ ├── animated │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ ├── style.css │ │ │ └── test.scenario.js │ │ └── reorderDelete │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── test.scenario.js │ ├── radio │ │ └── chooseOne │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── test.scenario.js │ ├── refresher │ │ └── refreshList │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── test.scenario.js │ ├── sideMenus │ │ ├── navWithMenu │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── test.scenario.js │ │ └── simple │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ ├── style.css │ │ │ └── test.scenario.js │ ├── slideBox │ │ └── appIntro │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ ├── style.css │ │ │ └── test.scenario.js │ ├── tabs │ │ └── tabsAndNav │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── test.scenario.js │ ├── textInput │ │ └── floatingLabel │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── test.scenario.js │ └── toggle │ │ └── simple │ │ ├── index.html │ │ ├── index.js │ │ └── test.scenario.js ├── old │ ├── actionsheet │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── app-intro-walkthrough │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── checkbox │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── collection-repeat │ │ ├── contacts.js │ │ ├── contacts.json │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── flickr-search-example │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── frosted-glass-effect │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── google-maps │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── lists │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── loading-bar │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── modal │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── popup │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── pull-to-refresh │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── radio-buttons │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── shrinking-header │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── side-menu-and-navigation │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── sign-in-then-tabs │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── starter-template │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── swipeable-cards │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── tabs-and-navigation │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ ├── thumbnail-list │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ └── toggle │ │ ├── index.html │ │ ├── script.js │ │ └── style.css └── service │ ├── actionSheet │ ├── index.html │ ├── index.js │ └── test.scenario.js │ ├── loading │ ├── index.html │ ├── index.js │ └── test.scenario.js │ ├── popover │ ├── index.html │ ├── index.js │ └── test.scenario.js │ └── popup │ └── popping │ ├── index.html │ ├── index.js │ └── test.scenario.js ├── gulpfile.js ├── js ├── angular │ ├── controller │ │ ├── headerBarController.js │ │ ├── infiniteScrollController.js │ │ ├── listController.js │ │ ├── navBarController.js │ │ ├── navViewController.js │ │ ├── refresherController.js │ │ ├── scrollController.js │ │ ├── sideMenuController.js │ │ ├── spinnerController.js │ │ ├── tabController.js │ │ ├── tabsController.js │ │ └── viewController.js │ ├── directive │ │ ├── actionSheet.js │ │ ├── checkbox.js │ │ ├── collectionRepeat.js │ │ ├── content.js │ │ ├── exposeAsideWhen.js │ │ ├── gesture.js │ │ ├── headerFooterBar.js │ │ ├── infiniteScroll.js │ │ ├── input.js │ │ ├── item.js │ │ ├── itemDeleteButton.js │ │ ├── itemFloatingLabel.js │ │ ├── itemOptionButton.js │ │ ├── itemReorderButton.js │ │ ├── keyboardAttach.js │ │ ├── list.js │ │ ├── menuClose.js │ │ ├── menuToggle.js │ │ ├── modal.js │ │ ├── modalView.js │ │ ├── navBackButton.js │ │ ├── navBar.js │ │ ├── navButtons.js │ │ ├── navDirection.js │ │ ├── navTitle.js │ │ ├── navTransition.js │ │ ├── navView.js │ │ ├── ngClick.js │ │ ├── pane.js │ │ ├── popover.js │ │ ├── popoverView.js │ │ ├── radio.js │ │ ├── refresher.js │ │ ├── scroll.js │ │ ├── sideMenu.js │ │ ├── sideMenuContent.js │ │ ├── sideMenus.js │ │ ├── slideBox.js │ │ ├── slides.js │ │ ├── spinner.js │ │ ├── tab.js │ │ ├── tabNav.js │ │ ├── tabs.js │ │ ├── title.js │ │ ├── toggle.js │ │ └── view.js │ ├── main.js │ └── service │ │ ├── actionSheet.js │ │ ├── angularOverrides.js │ │ ├── backdrop.js │ │ ├── bind.js │ │ ├── body.js │ │ ├── clickBlock.js │ │ ├── decorators │ │ ├── angular-ios9-uiwebview.patch.js │ │ ├── compile.js │ │ └── location.js │ │ ├── gesture.js │ │ ├── history.js │ │ ├── ionicConfig.js │ │ ├── loading.js │ │ ├── modal.js │ │ ├── navBarDelegate.js │ │ ├── navViewDelegate.js │ │ ├── platform.js │ │ ├── popover.js │ │ ├── popup.js │ │ ├── position.js │ │ ├── scrollDelegate.js │ │ ├── sideMenuDelegate.js │ │ ├── slideBoxDelegate.js │ │ ├── tabsDelegate.js │ │ ├── templateCache.js │ │ ├── templateLoader.js │ │ ├── viewService.js │ │ └── viewSwitcher.js ├── ionic.js ├── utils │ ├── activator.js │ ├── delegateService.js │ ├── dom.js │ ├── events.js │ ├── gestures.js │ ├── keyboard.js │ ├── platform.js │ ├── poly.js │ ├── tap.js │ ├── utils.js │ └── viewport.js └── views │ ├── listView.js │ ├── modalView.js │ ├── scrollView.js │ ├── scrollViewNative.js │ ├── sideMenuView.js │ ├── sliderView.js │ ├── slidesView.js │ ├── toggleView.js │ └── view.js ├── package.js ├── package.json ├── release ├── css │ ├── ionic.css │ └── ionic.min.css ├── fonts │ ├── ionicons.eot │ ├── ionicons.svg │ ├── ionicons.ttf │ └── ionicons.woff ├── js │ ├── angular-ui │ │ ├── angular-ui-router.js │ │ └── angular-ui-router.min.js │ ├── angular │ │ ├── angular-animate.js │ │ ├── angular-animate.min.js │ │ ├── angular-resource.js │ │ ├── angular-resource.min.js │ │ ├── angular-sanitize.js │ │ ├── angular-sanitize.min.js │ │ ├── angular.js │ │ └── angular.min.js │ ├── ionic-angular.js │ ├── ionic-angular.min.js │ ├── ionic.bundle.js │ ├── ionic.bundle.min.js │ ├── ionic.js │ └── ionic.min.js └── version.json ├── scripts ├── app-base │ └── publish.sh ├── bower │ └── publish.sh ├── bump │ ├── nightly.sh │ └── release.sh ├── cdn │ └── publish.sh ├── circle │ ├── deploy.sh │ ├── prepare.sh │ └── test.sh ├── clone │ └── clone.sh ├── demo │ └── publish.sh ├── pre-push-validate ├── release │ └── publish.sh ├── site │ ├── config.sh │ ├── docs.sh │ └── prepare.sh ├── update-angular.sh └── utils.inc ├── scss ├── _action-sheet.scss ├── _animations.scss ├── _backdrop.scss ├── _badge.scss ├── _bar.scss ├── _button-bar.scss ├── _button.scss ├── _checkbox.scss ├── _form.scss ├── _grid.scss ├── _items.scss ├── _list.scss ├── _loading.scss ├── _menu.scss ├── _mixins.scss ├── _modal.scss ├── _platform.scss ├── _popover.scss ├── _popup.scss ├── _progress.scss ├── _radio.scss ├── _range.scss ├── _refresher.scss ├── _reset.scss ├── _scaffolding.scss ├── _select.scss ├── _slide-box.scss ├── _slides.scss ├── _spinner.scss ├── _tabs.scss ├── _toggle.scss ├── _transitions.scss ├── _type.scss ├── _util.scss ├── _variables.scss ├── ionic.scss └── ionicons │ ├── _ionicons-font.scss │ ├── _ionicons-icons.scss │ ├── _ionicons-variables.scss │ └── ionicons.scss └── test ├── css ├── bars-clear.html ├── button-bar.html ├── buttons-borderless.html ├── buttons-button-block-clear.html ├── buttons-button-block.html ├── buttons-button-outline.html ├── buttons-clear.html ├── buttons-default.html ├── buttons-full.html ├── buttons-large.html ├── buttons-link-block-clear.html ├── buttons-link-block.html ├── buttons-link-icon.html ├── buttons-link-outline.html ├── buttons-misc.html ├── buttons-outline.html ├── buttons-pseudo-icon-compare.html ├── buttons-small.html ├── buttons.html ├── cards-header-footer.html ├── cards-item-avatar.html ├── cards-item-body.html ├── cards-item-icon.html ├── cards-item-thumbnail.html ├── cards-text.html ├── colors.html ├── footers.html ├── form-simple.html ├── grid.html ├── headers-android.html ├── headers-ios.html ├── headers.html ├── input-checkbox.html ├── input-radio.html ├── input-range.html ├── input-select.html ├── input-text.html ├── input-textarea.html ├── input-toggle.html ├── lists-avatar.html ├── lists-buttons.html ├── lists-colors-complex.html ├── lists-colors.html ├── lists-icons.html ├── lists-text.html ├── lists-thumbnails.html ├── progress.html ├── scroll.html ├── search-ios.html ├── search.html ├── split-pane.html ├── status-bar.html ├── subfooters.html ├── subheaders.html ├── tabs-active-color-android.html ├── tabs-active-color-ios.html ├── tabs-and-cards.html ├── tabs-android.html ├── tabs-default.html ├── tabs-icons-bottom.html ├── tabs-icons-left.html ├── tabs-icons-right.html ├── tabs-ios.html ├── tabs-no-icons.html ├── tabs-only-icons.html ├── tabs-with-footer.html ├── test.scenario.js └── type.html ├── html ├── actionsheet.html ├── anchorScroll.html ├── animation.html ├── animation_transition.html ├── app_icon.png ├── autolayout │ ├── index.html │ └── ng-auto.js ├── back-button.html ├── cards.html ├── carousel.html ├── cat1.png ├── cat2.png ├── cat3.png ├── cat4.png ├── checkbox-watch.html ├── clickTests.html ├── clickTests2.html ├── collection-repeat │ ├── basic-grid.html │ ├── basic-list.html │ ├── contacts.html │ ├── horizontal-image-grid.html │ └── side-menu-exposed.html ├── component-test.html ├── content.html ├── content_defer.html ├── content_h.html ├── content_simple.html ├── contenteditable.html ├── dom-trace.js ├── drag.html ├── dynamics.js ├── embeddedObject.html ├── exoplanet.jpg ├── gesture.html ├── has-anything-dynamic.html ├── header.html ├── history.html ├── infinite-scroll.html ├── input-radio-basic.html ├── input-radio-patch.html ├── input-radio-zarko.html ├── input-radio.html ├── input-range.html ├── input.html ├── jan │ ├── app.js │ ├── contact.html │ ├── index.html │ ├── info.html │ ├── jan.html │ ├── menu.html │ └── patch.js ├── keyboard.html ├── lifecycle │ ├── TestEight.html │ ├── TestFive.html │ ├── TestFour.html │ ├── TestNine.html │ ├── TestOne.html │ ├── TestSeven.html │ ├── TestSix.html │ ├── TestThree.html │ ├── TestTwo.html │ └── testnine-debug │ │ ├── SimpleOne.html │ │ └── SimpleTwo.html ├── list.html ├── loading.html ├── map.html ├── modal.html ├── modal2.html ├── nav.html ├── navParams.html ├── nestedScroll.html ├── openLayers.html ├── overflow.html ├── platforms.html ├── poly.html ├── popover.html ├── popup.html ├── popupRace.html ├── pull-to-refresh.html ├── rememberScroll.html ├── scroll-set-top.html ├── scroll.html ├── scroll2.html ├── scroll_content.html ├── scroll_xy.html ├── sideMenu.html ├── sideMenu2.html ├── sideMenuExpose.html ├── sidemenu-starter.html ├── slideBox.html ├── slideBoxDynamic.html ├── slideBoxRepeat.html ├── slideBoxSimple.html ├── slides.html ├── slidesProducts.html ├── spinners.html ├── status-bar-toggles.html ├── subControllers.html ├── tabs-active.html ├── tabs-cache.html ├── tabs-repeat.html ├── tabs-starter.html ├── tabs-templates │ ├── about.html │ ├── facts.html │ ├── facts2.html │ ├── home.html │ ├── nav-stack.html │ └── tabs.html ├── tabs.html ├── tapInputs.html ├── toggle.html ├── tree_bark.png ├── video.html └── viewState.html └── unit ├── angular ├── controller │ ├── listController.unit.js │ ├── navBarController.unit.js │ ├── navViewController.unit.js │ ├── refreshController.unit.js │ ├── scrollController.unit.js │ ├── sideMenuController.unit.js │ └── viewController.unit.js ├── directive │ ├── backdrop.unit.js │ ├── checkbox.unit.js │ ├── collectionRepeat.unit.js │ ├── content.unit.js │ ├── gesture.unit.js │ ├── headerFooterBar.unit.js │ ├── infiniteScroll.unit.js │ ├── item.unit.js │ ├── keyboardAttach.unit.js │ ├── list.unit.js │ ├── navBackButton.unit.js │ ├── navBar.unit.js │ ├── navButtons.unit.js │ ├── navView.unit.js │ ├── radio.unit.js │ ├── refresher.unit.js │ ├── scroll.unit.js │ ├── sideMenu.unit.js │ ├── slideBox.unit.js │ ├── spinner.js │ ├── tabs.unit.js │ ├── toggle.unit.js │ └── view.unit.js └── service │ ├── actionSheet.unit.js │ ├── angularOverrides.unit.js │ ├── bind.unit.js │ ├── body.unit.js │ ├── decorators │ └── location.unit.js │ ├── delegateService.unit.js │ ├── gesture.unit.js │ ├── history.unit.js │ ├── ionicConfig.unit.js │ ├── loading.unit.js │ ├── modal.unit.js │ ├── platform.unit.js │ ├── popover.unit.js │ ├── popup.unit.js │ ├── templateCache.unit.js │ ├── templateLoader.unit.js │ └── viewSwitcher.unit.js ├── events.unit.js ├── utils ├── activator.unit.js ├── dom.unit.js ├── keyboard.unit.js ├── tap.unit.js └── viewport.unit.js └── views ├── listView.unit.js ├── modalView.unit.js ├── scrollView.unit.js ├── scrollViewNative.unit.js ├── sideMenu.unit.js └── toggleView.unit.js /.agignore: -------------------------------------------------------------------------------- 1 | release -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | # Tabs in JS unless otherwise specified 13 | [**.js] 14 | indent_style = space 15 | indent_size = 2 16 | 17 | [*.md] 18 | trim_trailing_whitespace = false 19 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | js/views/slidesView.js 2 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true 4 | }, 5 | "globals": { 6 | "ionic": true, 7 | "IonicModule": true, 8 | "angular": true, 9 | "jqLite": true, 10 | "forEach": true, 11 | "isDefined": true, 12 | "isNumber": true, 13 | "isString": true, 14 | "noop": true, 15 | "extend": true, 16 | "deprecated": true, 17 | "cordova": true, 18 | "DocumentTouch": true, 19 | "describe": true, 20 | "ddescribe": true, 21 | "it": true, 22 | "iit": true, 23 | "inject": true, 24 | "beforeEach": true, 25 | "afterEach": true, 26 | "expect": true 27 | }, 28 | "rules": { 29 | "quotes": false, 30 | "no-underscore-dangle": false, 31 | "no-unused-expressions": false, 32 | "curly": [2, "multi-line"], 33 | "strict": false, 34 | "no-use-before-define": false, 35 | "eqeqeq": false, 36 | "new-cap": [2, {"capIsNew": false}], 37 | "dot-notation": [2, {"allowKeywords": false}], 38 | "no-console": false, 39 | "no-return-assign": false, 40 | "no-shadow": false, 41 | "comma-dangle": false, 42 | "camelcase": [2, {"properties": "never"}] 43 | } 44 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Note: If you are having problems formatting your issue please refer to this article on using markdown in Github:** 2 | 3 | https://guides.github.com/features/mastering-markdown/ 4 | 5 | **Note: for support questions, please use one of these channels:** 6 | 7 | https://forum.ionicframework.com/ 8 | http://ionicworldwide.herokuapp.com/ 9 | 10 | 11 | #### Short description of the problem: 12 | 13 | 14 | #### What behavior are you expecting? 15 | 16 | 17 | **Steps to reproduce:** 18 | 1. 19 | 2. 20 | 3. 21 | 22 | ``` 23 | insert any relevant code between the above and below backticks 24 | ``` 25 | 26 | **Other information:** (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc) 27 | 28 | 29 | **Which Ionic Version?** 1.x or 2.x 30 | 31 | 32 | #### Plunker that shows an example of your issue 33 | 34 | **For Ionic 1 issues** - http://plnkr.co/edit/Xo1QyAUx35ny1Xf9ODHx?p=preview 35 | 36 | **For Ionic 2 issues** - http://plnkr.co/edit/me3Uk0GKWVRhZWU0usad?p=preview 37 | 38 | 39 | **Run `ionic info` from terminal/cmd prompt:** (paste output below) 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### Short description of what this resolves: 2 | 3 | 4 | #### Changes proposed in this pull request: 5 | 6 | - 7 | - 8 | - 9 | 10 | **Ionic Version**: 1.x / 2.x 11 | 12 | **Fixes**: # 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | *.sw[mnpcod] 4 | *.log 5 | *.tmp 6 | *.tmp.* 7 | log.txt 8 | example/cordova/iOS/www/js/framework 9 | 10 | example/cordova/iOS/www/js/framework 11 | .sass-cache/ 12 | framework.sublime-project 13 | 14 | framework.sublime-workspace 15 | UserInterfaceState.xcuserstate 16 | 17 | *.sublime-project 18 | 19 | *.sublime-workspace 20 | 21 | bower_components/ 22 | components/ 23 | tmp 24 | temp 25 | dist 26 | 27 | .idea 28 | 29 | .versions 30 | 31 | # Coverage directory used by tools like istanbul 32 | coverage/ 33 | -------------------------------------------------------------------------------- /.jshintignore: -------------------------------------------------------------------------------- 1 | js/ext/angular/test/**/*.js 2 | js/views/scrollView.js 3 | js/views/sliderView.js 4 | js/utils/utils.js 5 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | As contributors and maintainers of the Ionic project, we pledge to respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities. 4 | 5 | Communication through any of Ionic's channels (GitHub, Slack, Forum, IRC, mailing lists, Twitter, etc.) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. 6 | 7 | We promise to extend courtesy and respect to everyone involved in this project regardless of gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We expect anyone contributing to the Ionic project to do the same. 8 | 9 | If any member of the community violates this code of conduct, the maintainers of the Ionic project may take action, removing issues, comments, and PRs or blocking accounts as deemed appropriate. 10 | 11 | If you are subject to or witness unacceptable behavior, or have any other concerns, please email us at [hi@ionicframework.com](mailto:hi@ionicframework.com). 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2013-present Drifty Co. 2 | http://drifty.com/ 3 | 4 | MIT License 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | "Software"), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 21 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 22 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 23 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Ionic 1.x 2 | 3 | **Support for Ionic v1 ended in January 2017. We strongly recommend upgrading to the latest version of Ionic.** 4 | 5 | **See the [Migration from Ionic 1 Guide](https://ionicframework.com/docs/reference/migration#migrating-from-ionic-10-to-ionic-40) for migration information.** 6 | 7 | **See [Ionic Support Policy](https://ionicframework.com/docs/reference/support#framework-maintenance-and-support-status) for the support status of each version of Ionic.** 8 | 9 | **Visit https://ionicframework.com/docs for the latest Ionic documentation.** 10 | 11 | ---- 12 | 13 | This is the repo for Ionic 1.x. If you're looking for the latest version (>= 2.0) of Ionic, please visit the main [Ionic](https://github.com/ionic-team/ionic) repo. 14 | 15 | For new apps, we *strongly* recommend the [latest version of Ionic](https://github.com/ionic-team/ionic) which comes with the latest version of Angular, many new components, enhanced performance, and more. 16 | 17 | For more information on Ionic 1.x, please read the [original README.md](README_OLD.md) 18 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ionic", 3 | "version": "1.3.5", 4 | "codename": "hong kong", 5 | "homepage": "https://github.com/ionic-team/ionic-v1", 6 | "authors": [ 7 | "Max Lynch ", 8 | "Adam Bradley ", 9 | "Ben Sperry " 10 | ], 11 | "description": "Advanced HTML5 hybrid mobile app development framework.", 12 | "main": [ 13 | "release/css/ionic.css", 14 | "release/fonts/*", 15 | "release/js/ionic.js", 16 | "release/js/ionic-angular.js" 17 | ], 18 | "keywords": [ 19 | "mobile", 20 | "html5", 21 | "ionic", 22 | "cordova", 23 | "phonegap", 24 | "trigger", 25 | "triggerio", 26 | "angularjs", 27 | "angular" 28 | ], 29 | "license": "MIT", 30 | "private": false, 31 | "ignore": [ 32 | "**/.*", 33 | "CONTRIBUTING.md", 34 | "Gruntfile.js", 35 | "component.json", 36 | "config", 37 | "examples", 38 | "package.json", 39 | "release/js/angular", 40 | "release/js/angular-ui", 41 | "scripts", 42 | "test", 43 | "js/controllers", 44 | "js/ext", 45 | "js/utils", 46 | "js/views", 47 | "js/_license.js", 48 | "js/ionic.js" 49 | ], 50 | "dependencies": { 51 | "angular": "1.5.3", 52 | "angular-animate": "1.5.3", 53 | "angular-sanitize": "1.5.3", 54 | "angular-ui-router": "0.2.13" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | node: 3 | version: 4.1.0 4 | ruby: 5 | version: 2.1.2 6 | checkout: 7 | post: 8 | # Make sure that the git repo that circleCI clones is not cloned shallow 9 | # (by default, it only clones the last 25 commits - aka shallow) 10 | # copy/pasted from circleCI support) 11 | - "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow" 12 | dependencies: 13 | pre: 14 | - ./scripts/site/prepare.sh 15 | cache_directories: 16 | - "~/ionic-site" # cache ionic-site 17 | post: 18 | - bower install 19 | test: 20 | override: 21 | - ./scripts/circle/test.sh --index=$CIRCLE_NODE_INDEX --total=$CIRCLE_NODE_TOTAL 22 | deployment: 23 | tasks: 24 | branch: "1.x" 25 | commands: 26 | - ./scripts/circle/deploy.sh --sha1=$CIRCLE_SHA1 --index=$CIRCLE_NODE_INDEX --build-number=$CIRCLE_BUILD_NUM 27 | -------------------------------------------------------------------------------- /component.json: -------------------------------------------------------------------------------- 1 | { 2 | "repo": "ionic-team/ionic", 3 | "development": {}, 4 | "version": "1.3.5", 5 | "styles": [ 6 | "dist/css/ionic.css" 7 | ], 8 | "paths": [ 9 | "scss" 10 | ], 11 | "scripts": [ 12 | "dist/js/ionic.js", 13 | "dist/js/angular/angular.js", 14 | "dist/js/angular/angular-animate.js", 15 | "dist/js/angular/angular-sanitize.js", 16 | "dist/js/angular-ui/angular-ui-router.js", 17 | "dist/js/ionic-angular.js" 18 | ], 19 | "fonts": [ 20 | "dist/fonts/ionicons.eot", 21 | "dist/fonts/ionicons.svg", 22 | "dist/fonts/ionicons.ttf", 23 | "dist/fonts/ionicons.woff" 24 | ], 25 | "name": "Ionic", 26 | "keywords": ["ionic","mobile","html5","hybrid","angularjs","cordova","phonegap"], 27 | "license": "MIT", 28 | "description": "An advanced HTML5 mobile development framework" 29 | } 30 | -------------------------------------------------------------------------------- /config/CODENAMES: -------------------------------------------------------------------------------- 1 | israel 2 | jamaica 3 | korea 4 | los angeles 5 | madison 6 | nigeria 7 | -------------------------------------------------------------------------------- /config/DISCOURSE_POST_URL: -------------------------------------------------------------------------------- 1 | http://forum.ionicframework.com/t/1-0-0-beta-10-hafnium-heron-released/7326/ 2 | -------------------------------------------------------------------------------- /config/demos/static-site/file-readers/yaml.js: -------------------------------------------------------------------------------- 1 | var jsYaml = require('js-yaml'); 2 | var path = require('canonical-path'); 3 | 4 | var YAML_LINE_REGEX = /---+/; 5 | var FILE_PATTERN_REGEX = /\.(scenario.js|js|html|css)$/; 6 | 7 | module.exports = { 8 | pattern: FILE_PATTERN_REGEX, 9 | processFile: function(filePath, contents, basePath) { 10 | 11 | contents = contents.trim(); 12 | 13 | var yamlStartMatch = contents.match(YAML_LINE_REGEX); 14 | if (!yamlStartMatch || yamlStartMatch.index !== 0) { 15 | return []; 16 | } 17 | 18 | var yamlContents = contents.substring(yamlStartMatch.index + yamlStartMatch[0].length + 1); 19 | 20 | var yamlEndMatch = yamlContents.match(YAML_LINE_REGEX); 21 | if (!yamlEndMatch) { 22 | return []; 23 | } 24 | 25 | contents = yamlContents.substring(yamlEndMatch.index + yamlEndMatch[0].length); 26 | yamlContents = yamlContents.substring(0, yamlEndMatch.index); 27 | 28 | var yamlJson = jsYaml.safeLoad(yamlContents); 29 | 30 | return [{ 31 | fileType: filePath.match(FILE_PATTERN_REGEX)[0].toString(), 32 | file: filePath, 33 | basePath: basePath, 34 | contents: contents, 35 | yaml: yamlJson 36 | }]; 37 | } 38 | }; 39 | 40 | -------------------------------------------------------------------------------- /config/demos/static-site/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | 3 | require('dgeni-packages/base')(config); 4 | require('dgeni-packages/nunjucks')(config); 5 | 6 | config.append('source.fileReaders', [ 7 | require('./file-readers/yaml') 8 | ]); 9 | 10 | config.append('processing.processors', [ 11 | ]); 12 | 13 | return config; 14 | }; 15 | -------------------------------------------------------------------------------- /config/demos/static-site/spec/file-readers/_test-data/long-header.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------- 4 | car: is fast 5 | tortoise: is slow 6 | --- 7 | 8 | 9 | Some content 10 | -------------------------------------------------------------------------------- /config/demos/static-site/spec/file-readers/_test-data/markdown-title.md: -------------------------------------------------------------------------------- 1 | Here's a title 2 | -------------- 3 | -------------------------------------------------------------------------------- /config/demos/static-site/spec/file-readers/_test-data/no-closing-header.md: -------------------------------------------------------------------------------- 1 | --- 2 | something: is here 3 | 4 | 5 | Hello there 6 | -------------------------------------------------------------------------------- /config/demos/static-site/spec/file-readers/_test-data/no-header.md: -------------------------------------------------------------------------------- 1 | hello 2 | -------------------------------------------------------------------------------- /config/demos/static-site/spec/file-readers/_test-data/normal-header.md: -------------------------------------------------------------------------------- 1 | --- 2 | hello: world 3 | works: true 4 | --- 5 | 6 | **Here's** some content. 7 | -------------------------------------------------------------------------------- /config/demos/static-site/spec/file-readers/yaml.spec.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var path = require('canonical-path'); 3 | var processor = require('../../file-readers/yaml'); 4 | 5 | describe('yaml file-reader', function() { 6 | 7 | function readTestFile(name) { 8 | return fs.readFileSync(path.resolve(__dirname, '_test-data', name)).toString(); 9 | } 10 | 11 | it('normal yaml header should process', function() { 12 | var contents = readTestFile('normal-header.md'); 13 | 14 | var result = processor.processFile('some/file.md', contents); 15 | expect(result.contents.trim()).toEqual('**Here\'s** some content.'); 16 | expect(result.yaml).toEqual({hello: 'world', works: true}); 17 | }); 18 | 19 | it('long yaml header should process', function() { 20 | var contents = readTestFile('long-header.md'); 21 | 22 | var result = processor.processFile('cool/file.md', contents); 23 | expect(result.contents.trim()).toEqual('Some content'); 24 | expect(result.yaml).toEqual({car: 'is fast', tortoise: 'is slow'}); 25 | }); 26 | 27 | ['markdown-title.md', 'no-closing-header.md', 'no-header.md'].forEach(function(file) { 28 | it(file + ' should not be processed', function() { 29 | var contents = readTestFile(file); 30 | var result = processor.processFile('cool/file.md', contents); 31 | expect(result).toBeFalsy(); 32 | }); 33 | }); 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /config/demos/templates/asset.contents.template: -------------------------------------------------------------------------------- 1 | {$ doc.contents $} 2 | -------------------------------------------------------------------------------- /config/demos/templates/pages-data.template.js: -------------------------------------------------------------------------------- 1 | var DEMOS = {$ doc.demos | json $}; 2 | -------------------------------------------------------------------------------- /config/demos/templates/scenario.template.js: -------------------------------------------------------------------------------- 1 | describe('{$ doc.id $}', function() { 2 | 3 | it('should init', function() { 4 | browser.get('{$ doc.url $}'); 5 | }); 6 | 7 | {$ doc.contents $} 8 | 9 | }); 10 | -------------------------------------------------------------------------------- /config/docs/README.md: -------------------------------------------------------------------------------- 1 | Editing Doc Pages 2 | ----------------- 3 | 4 | First, follow these steps: https://github.com/ionic-team/ionic#documentation 5 | 6 | **Templates in `templates` folder** 7 | 8 | - `templates/pages-data.template.html` => `_layout/docs_api.html` 9 | - `templates/index.template.html` => The 'index' page for a doc version - http://ajoslin.github.io/docs/0.9.26/ 10 | - `templates/lib/yaml.template.html` => the common yaml config items that every doc page includes 11 | - `templates/api/componentGroup.template.html` => the template for every 'componentGroup' (eg http://ajoslin.github.io/docs/0.9.26/api/ionic/directive/) 12 | - `templates/api/api.template.html` - the base that every doc-item extends from 13 | - `templates/api/{something}.template.html` - the template for {something} - eg directive.template.html for directives 14 | 15 | Not everything in all the pages is used - a lot of it is from Angular templates. Eg things like 'doc.deprecated' aren't used currently. 16 | 17 | **New Versions** 18 | 19 | Every version uses its own include for left menu, which is manually written. 20 | 21 | The first time a version is generated, if there is no _includes/api_menu_{{versionName}}.html, it will generate a generic one for you. 22 | 23 | Then you can do what you want to edit that. 24 | -------------------------------------------------------------------------------- /config/docs/filters/capital.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'capital', 3 | process: function(str) { 4 | str || (str = ''); 5 | return str.charAt(0).toUpperCase() + str.substring(1); 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /config/docs/generate-versions.js: -------------------------------------------------------------------------------- 1 | var _ = require('lodash'); 2 | var fs = require('fs'); 3 | var semver = require('semver'); 4 | var path = require('canonical-path'); 5 | 6 | module.exports = function(config) { 7 | var basePath = config.get('basePath'); 8 | var outputFolder = config.get('rendering.outputFolder'); 9 | var currentVersion = config.get('currentVersion'); 10 | 11 | var docsBaseFolder = path.resolve(basePath, outputFolder, 'docs'); 12 | 13 | var versions; 14 | try { 15 | versions = fs.readdirSync(docsBaseFolder) 16 | .filter(semver.valid) 17 | .sort(semver.rcompare); 18 | } catch(e) { 19 | versions = []; 20 | } 21 | 22 | !_.contains(versions, currentVersion) && versions.unshift(currentVersion); 23 | !_.contains(versions, 'nightly') && versions.unshift('nightly'); 24 | 25 | //First semver valid version is latest 26 | var latestVersion = _.find(versions, semver.valid); 27 | versions = versions.map(function(version) { 28 | //Latest version is in docs root 29 | var folder = version == latestVersion ? '' : version; 30 | return { 31 | href: path.join('/docs', folder), 32 | folder: folder, 33 | name: version 34 | }; 35 | }); 36 | 37 | return { 38 | list: versions, 39 | current: _.find(versions, { name: currentVersion }), 40 | latest: _.find(versions, {name: latestVersion}) || _.first(versions) 41 | }; 42 | }; 43 | -------------------------------------------------------------------------------- /config/docs/inline-tag-defs/link.js: -------------------------------------------------------------------------------- 1 | var INLINE_LINK = /(\S+)(?:\s+(.+))?/; 2 | var log = require('winston'); 3 | 4 | module.exports = { 5 | name: 'link', 6 | description: 'Process inline link tags (of the form {@link some/uri Some Title}), replacing them with HTML anchors', 7 | handlerFactory: function(partialNames, config) { 8 | 9 | return function handleLinkTags(doc, tagName, tagDescription) { 10 | var versionData = config.get('versionData'); 11 | 12 | // Parse out the uri and title 13 | return tagDescription.replace(INLINE_LINK, function(match, uri, title) { 14 | 15 | var linkInfo = partialNames.getLink(uri, title, doc); 16 | 17 | if ( !linkInfo.valid ) { 18 | log.warn(linkInfo.error, 'in', doc.relativePath + '#' + doc.name); 19 | linkInfo.title = 'TODO:' + linkInfo.title; 20 | } 21 | 22 | return '' + linkInfo.title + ''; 23 | }); 24 | }; 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /config/docs/processors/index-page.js: -------------------------------------------------------------------------------- 1 | var path = require('canonical-path'); 2 | var log = require('winston'); 3 | 4 | module.exports = { 5 | name: 'index-page', 6 | runAfter: ['adding-extra-docs'], 7 | runBefore: ['extra-docs-added'], 8 | description: 'Create documentation index page', 9 | process: function(docs, config) { 10 | var currentVersion = config.get('currentVersion'); 11 | var contentsFolder = config.get('rendering.contentsFolder'); 12 | var latestVersion = config.get('versionData.latest'); 13 | 14 | docs.push({ 15 | docType: 'index-page', 16 | id: 'index-page', 17 | currentVersion: currentVersion, 18 | template: 'api_index.template.html', 19 | outputPath: contentsFolder + '/api/index.md' 20 | }); 21 | if (latestVersion.name !== currentVersion) { 22 | docs.push({ 23 | docType: 'index-page', 24 | id: 'index-page', 25 | currentVersion: currentVersion, 26 | template: 'api_index.template.html', 27 | outputPath: contentsFolder + '/api/index.md' 28 | }); 29 | } 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /config/docs/processors/jekyll.js: -------------------------------------------------------------------------------- 1 | var log = require('winston'); 2 | 3 | module.exports = { 4 | name: 'jekyll', 5 | runAfter: ['api-docs'], 6 | runBefore: ['compute-path'], 7 | description: 'Create jekyll includes', 8 | process: function(docs, config) { 9 | var currentVersion = config.versionData.current.name; 10 | docs.push({ 11 | template: 'api_menu.template.html', 12 | outputPath: '_includes/api_menu.html' 13 | }); 14 | docs.push({ 15 | template: 'api_menu_version.template.html', 16 | outputPath: '_includes/api_menu_' + currentVersion + '.html' 17 | }); 18 | docs.push({ 19 | template: 'api_version_select.template.html', 20 | outputPath: '_includes/api_version_select.html' 21 | }); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /config/docs/processors/latest-version.js: -------------------------------------------------------------------------------- 1 | var copy = require('cpr').cpr; 2 | var mkdirp = require('mkdirp'); 3 | var path = require('canonical-path'); 4 | var q = require('q'); 5 | 6 | module.exports = { 7 | name: 'latest-version', 8 | runAfter: ['write-files'], 9 | description: 'Copy the latest version (that was compiled to docs/) into docs/versionName', 10 | process: function(docs, config) { 11 | var versionData = config.get('versionData'); 12 | 13 | var docsBase = path.join(config.get('rendering.outputFolder'), 'docs'); 14 | var versionDir = path.join(docsBase, versionData.latest.name); 15 | var latestDir = path.join(docsBase, 'api'); 16 | 17 | var deferred = q.defer(); 18 | 19 | mkdirp(versionDir, function() { 20 | copy(latestDir, path.join(versionDir, 'api'), { 21 | deleteFirst: true, 22 | overwrite: true 23 | }, function(err, files) { 24 | deferred.resolve(docs); 25 | }); 26 | }); 27 | 28 | return deferred.promise; 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /config/docs/tag-defs/index.js: -------------------------------------------------------------------------------- 1 | var log = require('dgeni').log; 2 | module.exports = [ 3 | { 4 | name: 'delegate', 5 | transforms: function(doc, tag, value) { 6 | return '{@link ' + value + '}'; 7 | } 8 | }, 9 | { 10 | name: 'parent', 11 | transforms: function(doc, tag, value) { 12 | return value.split(',').map(function(id) { 13 | return '{@link ' + id.trim() + '}'; 14 | }).join(' or '); 15 | } 16 | }, 17 | { name: 'codepen' }, 18 | { name: 'alias' } 19 | ]; 20 | -------------------------------------------------------------------------------- /config/docs/templates/api/componentGroup.template.html: -------------------------------------------------------------------------------- 1 | --- 2 | <@ include "lib/yaml.template.html" @> 3 | title: "<@ if doc.title @><$ doc.title $><@ elif doc.module @><$ doc.groupType | title $>s in module ionic<@ else @>Pages<@ endif @>" 4 | header_sub_title: "<$ doc.components.length $> <$ doc.groupType $>s" 5 | doc: "<$ doc.groupType $>" 6 | docType: "<$ doc.groupType $>" 7 | --- 8 | 9 | <@ block content @> 10 | 11 | <$ doc.description $> 12 | 13 | 14 | 15 | 16 | 17 | 18 | <@ for page in doc.components @> 19 | 20 | 21 | 22 | 23 | <@ endfor @> 24 |
NameDescription
<$ page.id | link(page.name, page) $><$ page.description | firstParagraph | marked $>
25 | 26 | <@ endblock @> 27 | -------------------------------------------------------------------------------- /config/docs/templates/api/controller.template.html: -------------------------------------------------------------------------------- 1 | <@ extends "api/object.template.html" @> 2 | 3 | <@ block related_components @> 4 | <@ if doc.providerDoc -@> 5 |
  • 6 | - <$ doc.providerDoc.name $> 7 |
  • 8 | <@- endif @> 9 | <@ endblock @> 10 | -------------------------------------------------------------------------------- /config/docs/templates/api/directive.template.html: -------------------------------------------------------------------------------- 1 | <@ include "lib/macros.html" -@> 2 | <@ extends "api/api.template.html" @> 3 | 4 | <@ block additional @> 5 | 6 | <@ block usage @> 7 |

    Usage

    8 | <@ if doc.usage @> 9 | <$ doc.usage $> 10 | <@ else @> 11 | <@ if doc.restrict.element @> 12 | 13 | ```html 14 | <<$ doc.name | dashCase $> 15 | <@- for param in doc.params @> 16 | <$ directiveParam(param.alias or param.name, param.type, '="', '"') $> 17 | <@- endfor @>> 18 | ... 19 | > 20 | ``` 21 | <@ endif -@> 22 | 23 | <@- if doc.restrict.attribute -@> 24 | 25 | ```html 26 | <<$ doc.element $> 27 | <@- for param in doc.params @> 28 | <$ directiveParam(param.name, param.type, '="', '"') $> 29 | <@- endfor @>> 30 | ... 31 | > 32 | ``` 33 | <@ endif -@> 34 | 35 | <@- if doc.restrict.cssClass -@> 36 | 37 | ```html 38 | <@ set sep = joiner(' ') @> 39 | <<$ doc.element $> class=" 40 | <@- for param in doc.params -@> 41 | <$ sep() $><$ directiveParam(param.name, param.type, ': ', ';') $> 42 | <@- endfor @>"> ... > 43 | ``` 44 | <@ endif -@> 45 | 46 | <@- endif @> 47 | <@ endblock -@> 48 | 49 | 50 | <@ if doc.params @> 51 |

    API

    52 | <$ paramTable(doc.params, true) $> 53 | <@ endif @> 54 | 55 | <@ include "lib/events.template.html" @> 56 | <@ endblock @> 57 | -------------------------------------------------------------------------------- /config/docs/templates/api/filter.template.html: -------------------------------------------------------------------------------- 1 | <@ include "lib/macros.html" -@> 2 | <@ extends "api/api.template.html" @> 3 | 4 | <@ block additional @> 5 |

    Usage

    6 |

    In HTML Template Binding

    7 | <@ if doc.usage @> 8 | <$ doc.usage | code $> 9 | <@ else @> 10 | <@ code -@> 11 | {{ <$ doc.name $>_expression | <$ doc.name $> 12 | <@- for param in doc.params @> : <$ param.name $><@ endfor -@> 13 | }} 14 | <@- endcode @> 15 | <@ endif @> 16 | 17 |

    In JavaScript

    18 | <@ code -@> 19 | <@- set sep = joiner(', ') -@> 20 | $filter('<$ doc.name $>')(<@ for param in doc.params @><$ sep() $><$ param.name $><@ endfor -@>) 21 | <@- endcode @> 22 | 23 | <$ paramTable(doc.params) $> 24 | <@ include "lib/this.template.html" @> 25 | <@ include "lib/returns.template.html" @> 26 | <@ endblock @> 27 | -------------------------------------------------------------------------------- /config/docs/templates/api/function.template.html: -------------------------------------------------------------------------------- 1 | <@ extends "api/object.template.html" @> 2 | -------------------------------------------------------------------------------- /config/docs/templates/api/object.template.html: -------------------------------------------------------------------------------- 1 | <@ include "lib/macros.html" -@> 2 | <@ extends "api/api.template.html" @> 3 | 4 | <@ block additional @> 5 | 6 | <@ if doc.usage @> 7 | ## Usage 8 | <$ doc.usage $> 9 | <@ endif @> 10 | 11 | <@ if doc.params or doc.returns or doc.this or doc.kind == 'function' -@> 12 |

    Usage

    13 | <@ if doc.usage @> 14 | <$ doc.usage $> 15 | <@ else @> 16 | <$ functionSyntax(doc) $> 17 | <@ endif @> 18 | 19 | <$ paramTable(doc.params) $> 20 | <@ include "lib/this.template.html" @> 21 | <@ include "lib/returns.template.html" @> 22 | <@- endif @> 23 | 24 | <@ include "lib/methods.template.html" @> 25 | <@ include "lib/events.template.html" @> 26 | <@ include "lib/properties.template.html" @> 27 | 28 | <@ endblock @> 29 | -------------------------------------------------------------------------------- /config/docs/templates/api/page.template.html: -------------------------------------------------------------------------------- 1 | <@ extends "api/object.template.html" @> 2 | -------------------------------------------------------------------------------- /config/docs/templates/api/provider.template.html: -------------------------------------------------------------------------------- 1 | <@ extends "api/object.template.html" @> 2 | 3 | <@ block related_components @> 4 | <@ if doc.serviceDoc -@> 5 |
  • 6 | - <$ doc.serviceDoc.name $> 7 |
  • 8 | <@- endif @> 9 | <@ endblock @> 10 | -------------------------------------------------------------------------------- /config/docs/templates/api/service.template.html: -------------------------------------------------------------------------------- 1 | <@ extends "api/object.template.html" @> 2 | 3 | <@ block related_components @> 4 | <@ if doc.providerDoc -@> 5 |
  • 6 | - <$ doc.providerDoc.name $> 7 |
  • 8 | <@- endif @> 9 | <@ endblock @> 10 | -------------------------------------------------------------------------------- /config/docs/templates/api/type.template.html: -------------------------------------------------------------------------------- 1 | <@ extends "api/object.template.html" @> 2 | -------------------------------------------------------------------------------- /config/docs/templates/api/utility.template.html: -------------------------------------------------------------------------------- 1 | <@ extends "api/object.template.html" @> 2 | 3 | <@ block related_components @> 4 | <@ if doc.providerDoc -@> 5 |
  • 6 | - <$ doc.providerDoc.name $> 7 |
  • 8 | <@- endif @> 9 | <@ endblock @> 10 | -------------------------------------------------------------------------------- /config/docs/templates/api_index.template.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: "docs_api" 3 | version: "<$ version.current.name $>" 4 | versionHref: "<$ version.current.href $>" 5 | path: "" 6 | 7 | title: Javascript 8 | header_sub_title: Extend Ionic even further with the power of AngularJS 9 | searchable: false 10 | --- 11 | 12 | # AngularJS Extensions 13 | 14 | Ionic is both a CSS framework and a Javascript UI library. Many components need Javascript in order to produce magic, though often components 15 | can easily be used without coding through framework extensions such as our AngularIonic extensions. 16 | 17 | Ionic follows the View Controller pattern popularized in such frameworks as Cocoa Touch. In the View Controller pattern, we treat different sections of the interface as child Views or even child View Controllers that contain other views. View Controllers then "power" the Views inside of them to provide interaction and UI functionality. A great example is the Tab Bar View Controller which processes taps on a Tab Bar to switch between a set of viewable panes. 18 | 19 | Explore our API docs for detailed information on the View Controllers and Javascript utilities available in Ionic. 20 | -------------------------------------------------------------------------------- /config/docs/templates/api_menu.template.html: -------------------------------------------------------------------------------- 1 | <@ for ver in version.list @> 2 | <@ if ver.name != version.latest.name @> 3 | <@ if loop.first @> 4 | {% if page.versionHref == "<$ ver.href $>" %} 5 | <@ else @> 6 | {% elsif page.versionHref == "<$ ver.href $>" %} 7 | <@ endif @> 8 | {% include api_menu_<$ ver.name $>.html %} 9 | <@ endif @> 10 | <@ endfor @> 11 | <# make the last case always be to show latest version #> 12 | {% else %} 13 | {% include api_menu_<$ version.latest.name $>.html %} 14 | {% endif %} 15 | -------------------------------------------------------------------------------- /config/docs/templates/api_version_select.template.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /config/docs/templates/lib/events.template.html: -------------------------------------------------------------------------------- 1 | <@- if doc.events @> 2 |

    Events

    3 |
      4 | <@- for event in doc.events @> 5 |
    • 6 |

      <$ event.name $>

      7 |
      <$ event.description | marked $>
      8 | <@- if event.eventType == 'listen' @> 9 |
      10 |

      Listen on: <$ event.eventTarget $>

      11 |
      12 | <@- else @> 13 |
      14 |

      Type:

      15 |
      <$ event.eventType $>
      16 |
      17 |
      18 |

      Target:

      19 |
      <$ event.eventTarget $>
      20 |
      21 | <@ endif -@> 22 |
    • 23 | <@ endfor -@> 24 |
    25 | <@ endif -@> 26 | -------------------------------------------------------------------------------- /config/docs/templates/lib/methods.template.html: -------------------------------------------------------------------------------- 1 | <@- if doc.methods @> 2 | ## Methods 3 | <@- for method in doc.methods @> 4 | 5 |
    6 |

    7 | <$ functionSyntax(method) $> 8 |

    9 | 10 | <$ method.description $> 11 | 12 | <@ if method.params @> 13 | <$ paramTable(method.params) $> 14 | <@ endif @> 15 | 16 | <@ if method.this @> 17 | #### Method's `this` 18 | <$ method.this $> 19 | <@ endif @> 20 | 21 | <@ if method.returns @> 22 | * Returns: <$ typeInfo(method.returns) $> 23 | <@ endif @> 24 | 25 | <@ endfor -@> 26 | <@- endif -@> 27 | -------------------------------------------------------------------------------- /config/docs/templates/lib/properties.template.html: -------------------------------------------------------------------------------- 1 | <@- if doc.properties @> 2 |

    Properties

    3 | <@- for property in doc.properties @> 4 | 5 |
    6 | *

    <$ typeList(property.returns.typeList) $> <$ property.name $>

    7 | 8 | <$ property.returns.description $> 9 | 10 | <$ property.description $> 11 | 12 | <@ endfor -@> 13 | <@- endif -@> 14 | -------------------------------------------------------------------------------- /config/docs/templates/lib/returns.template.html: -------------------------------------------------------------------------------- 1 | <@ if doc.returns -@> 2 |

    Returns

    3 | <$ typeInfo(doc.returns) $> 4 | <@- endif @> 5 | -------------------------------------------------------------------------------- /config/docs/templates/lib/this.template.html: -------------------------------------------------------------------------------- 1 | <@ if doc.this @> 2 |

    Method's <@ code @>this<@ endcode @>

    3 | <$ doc.this | marked $> 4 | <@ endif @> 5 | -------------------------------------------------------------------------------- /config/docs/templates/lib/yaml.template.html: -------------------------------------------------------------------------------- 1 | layout: "docs_api" 2 | version: "<$ version.current.name $>" 3 | versionHref: "<$ version.current.href $>" 4 | path: "<$ doc.path $>" 5 | -------------------------------------------------------------------------------- /config/lib/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/config/lib/fonts/ionicons.eot -------------------------------------------------------------------------------- /config/lib/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/config/lib/fonts/ionicons.ttf -------------------------------------------------------------------------------- /config/lib/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/config/lib/fonts/ionicons.woff -------------------------------------------------------------------------------- /config/lib/js/angular/version.json: -------------------------------------------------------------------------------- 1 | {"raw":"v1.5.3","major":1,"minor":5,"patch":3,"prerelease":[],"build":[],"version":"1.5.3","codeName":"diplohaplontic-meiosis","full":"1.5.3","branch":"v1.5.x","cdn":{"raw":"v1.5.2","major":1,"minor":5,"patch":2,"prerelease":[],"build":[],"version":"1.5.2","docsUrl":"http://code.angularjs.org/1.5.2/docs"}} -------------------------------------------------------------------------------- /config/lib/js/angular/version.txt: -------------------------------------------------------------------------------- 1 | 1.5.3 -------------------------------------------------------------------------------- /config/protractor-sauce.conf.js: -------------------------------------------------------------------------------- 1 | var _ = require('lodash'); 2 | var config = require('./protractor.conf').config; 3 | 4 | config.chromeOnly = false; 5 | 6 | exports.config = _.merge({}, config, { 7 | sauceUser: process.env.SAUCE_USER, 8 | sauceKey: process.env.SAUCE_KEY, 9 | 10 | capabilities: { 11 | build: process.env.SAUCE_BUILD_ID || 1, 12 | 'tunnel-identifier': process.env.SAUCE_TUNNEL_ID || 0, 13 | name: 'Ionic!', 14 | browserName: 'chrome' 15 | } 16 | }); 17 | 18 | -------------------------------------------------------------------------------- /config/protractor.conf.js: -------------------------------------------------------------------------------- 1 | var buildConfig = require('./build.config'); 2 | var path = require('canonical-path'); 3 | var projectRoot = path.resolve(__dirname, '..'); 4 | 5 | exports.config = { 6 | 7 | // Spec patterns are relative to the location of the spec file. They may 8 | // include glob patterns. 9 | specs: [ 10 | path.resolve(projectRoot, 'test/css/**/*.scenario.js'), 11 | path.resolve(projectRoot, 'demos/**/*.scenario.js'), 12 | ], 13 | 14 | // Options to be passed to Jasmine-node. 15 | jasmineNodeOpts: { 16 | showColors: true, // Use colors in the command line report. 17 | defaultTimeoutInterval: 120000, 18 | isVerbose: true 19 | }, 20 | 21 | baseUrl: 'http://localhost:' + buildConfig.protractorPort, 22 | 23 | onPrepare: function() { 24 | var ionicSnapshot = require('./lib/ionic-snapshot.js'); 25 | ionicSnapshot({ 26 | groupId: 'ionic', 27 | appId: 'kitchen-sink', 28 | accessKey: process.env.IONIC_SNAPSHOT_KEY 29 | }); 30 | } 31 | 32 | }; 33 | 34 | // protractor config/protractor.conf.js --browser chrome --params.width 400 --params.height 800 --params.test_id 123 35 | -------------------------------------------------------------------------------- /config/version.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "<%= pkg.version %>", 3 | "codename": "<%= pkg.codename %>", 4 | "date": "<%= date %>", 5 | "time": "<%= time %>" 6 | } 7 | -------------------------------------------------------------------------------- /demos/directive/checkbox/simple/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionCheckbox 4 | --- 5 | 6 | 7 |

    8 | Checkbox: Simple Usage 9 |

    10 |
    11 | 12 |

    Your pizza has {{toppings()}}!

    13 | 14 | Pepperoni? 15 | 16 | 17 | Sausage? 18 | 19 | 20 | Jalapeno? 21 | 22 | 23 | Anchovies? 24 | 25 |
    26 | -------------------------------------------------------------------------------- /demos/directive/checkbox/simple/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionCheckbox 4 | --- 5 | 6 | var app = angular.module('simple', ['ionic']); 7 | app.controller('CheckboxSimpleCtrl', function($scope) { 8 | $scope.pizza = { 9 | pepperoni: true, 10 | sausage: false, 11 | anchovies: true, 12 | jalapenos: false 13 | }; 14 | 15 | $scope.toppings = function() { 16 | var toppings = Object.keys($scope.pizza).filter(function(flavor) { 17 | return $scope.pizza[flavor]; 18 | }); 19 | if (toppings.length > 1) { 20 | toppings[toppings.length - 1] = 'and ' + toppings[toppings.length - 1]; 21 | } 22 | if (toppings.length > 2) { 23 | return toppings.join(', '); 24 | } else if (toppings.length) { 25 | return toppings.join(' '); 26 | } else { 27 | return 'nothing'; 28 | } 29 | }; 30 | }); 31 | -------------------------------------------------------------------------------- /demos/directive/checkbox/simple/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionCheckbox 4 | --- 5 | 6 | it('should uncheck 1st and check 2nd checkbox by clicking its label', function(){ 7 | var ele = element.all(by.css('label.item-checkbox')); 8 | ele.get(0).click(); 9 | ele.get(1).click(); 10 | }); 11 | 12 | it('should check 1st and uncheck 2nd checkbox by clicking its label', function(){ 13 | var ele = element.all(by.css('label.item-checkbox')); 14 | ele.get(0).click(); 15 | ele.get(1).click(); 16 | }); 17 | -------------------------------------------------------------------------------- /demos/directive/collectionRepeat/contacts/contacts.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: contacts 3 | component: collectionRepeat 4 | --- 5 | 6 |
    7 | 8 |

    3000 Contacts B

    9 | 10 |
    11 | 12 | 15 | 16 | 17 | 18 |
    21 | 22 |

    {{item.first_name+' '+item.last_name}}

    23 |

    {{$index}}

    24 |
    25 | 26 |
    27 |
    28 |
    29 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /demos/directive/collectionRepeat/contacts/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: contacts 3 | component: collectionRepeat 4 | --- 5 | 6 | it('should filter by juan', function(){ 7 | var ele = element(by.model('search')); 8 | ele.sendKeys('juan'); 9 | }); 10 | 11 | it('should clear search', function(){ 12 | var ele = element(by.css('.bar-header .button.clear')); 13 | ele.click(); 14 | }); 15 | -------------------------------------------------------------------------------- /demos/directive/footer/simple/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionFooterBar 4 | --- 5 |
    6 | 9 |

    Footer

    10 |
    11 | 12 | 13 | Make it a Subfooter? 14 | 15 | 16 | Show it? 17 | 18 |
    19 |
    20 | {{item}} 21 |
    22 |
    23 |
    24 |
    25 | -------------------------------------------------------------------------------- /demos/directive/footer/simple/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionFooterBar 4 | --- 5 | angular.module('simple', ['ionic']) 6 | .controller('FooterBarSimpleCtrl', function($scope) { 7 | $scope.data = { 8 | isSubfooter: false, 9 | isShown: true 10 | }; 11 | 12 | $scope.items = []; 13 | for (var i = 0; i < 20; i++) { 14 | $scope.items.push('Item ' + i); 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /demos/directive/footer/simple/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionFooterBar 4 | --- 5 | 6 | it('should show subfooter', function(){ 7 | var ele = element.all(by.css('.toggle')); 8 | ele.get(0).click(); 9 | }); 10 | 11 | it('should hide subfooter', function(){ 12 | var ele = element.all(by.css('.toggle')); 13 | ele.get(0).click(); 14 | }); 15 | 16 | it('should hide footer', function(){ 17 | var ele = element.all(by.css('.toggle')); 18 | ele.get(1).click(); 19 | }); 20 | 21 | it('should show footer', function(){ 22 | var ele = element.all(by.css('.toggle')); 23 | ele.get(1).click(); 24 | }); 25 | -------------------------------------------------------------------------------- /demos/directive/header/simple/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionHeaderBar 4 | --- 5 |
    6 | 9 |

    Tap Me to Scroll Top

    10 |
    11 | 12 | 13 | Make it a Subheader? 14 | 15 | 16 | Show it? 17 | 18 |
    19 |
    20 | {{item}} 21 |
    22 |
    23 |
    24 |
    25 | -------------------------------------------------------------------------------- /demos/directive/header/simple/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionHeaderBar 4 | --- 5 | angular.module('simple', ['ionic']) 6 | .controller('HeaderBarSimpleCtrl', function($scope) { 7 | $scope.data = { 8 | isSubheader: false, 9 | isShown: true 10 | }; 11 | $scope.items = []; 12 | for (var i = 0; i < 20; i++) { 13 | $scope.items.push('Item ' + i); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /demos/directive/header/simple/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionHeaderBar 4 | --- 5 | 6 | it('should show subheader', function(){ 7 | var ele = element.all(by.css('.toggle')); 8 | ele.get(0).click(); 9 | }); 10 | 11 | it('should hide subheader', function(){ 12 | var ele = element.all(by.css('.toggle')); 13 | ele.get(0).click(); 14 | }); 15 | 16 | it('should hide header', function(){ 17 | var ele = element.all(by.css('.toggle')); 18 | ele.get(1).click(); 19 | }); 20 | 21 | it('should show header', function(){ 22 | var ele = element.all(by.css('.toggle')); 23 | ele.get(1).click(); 24 | }); 25 | -------------------------------------------------------------------------------- /demos/directive/infiniteScroll/forever/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: forever 3 | component: ionInfiniteScroll 4 | --- 5 | 6 |

    Scroll Down to Load More

    7 |
    8 | 9 |
    10 |
    11 | {{item}} 12 |
    13 |
    14 | 15 | 16 | 17 |
    18 | -------------------------------------------------------------------------------- /demos/directive/infiniteScroll/forever/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: forever 3 | component: ionInfiniteScroll 4 | --- 5 | angular.module('forever', ['ionic']) 6 | .controller('ForeverCtrl', function($scope, $timeout) { 7 | $scope.items = []; 8 | for (var i = 0; i < 20; i++) { 9 | $scope.items.push(i); 10 | } 11 | 12 | //Load more after 1 second delay 13 | $scope.loadMoreItems = function() { 14 | var i = $scope.items.length; 15 | var j = $scope.items.length + 5; 16 | for (; i < j; i++) { 17 | $scope.items.push('Item ' + i); 18 | } 19 | $scope.$broadcast('scroll.infiniteScrollComplete'); 20 | }; 21 | }); 22 | -------------------------------------------------------------------------------- /demos/directive/infiniteScroll/forever/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: forever 3 | component: ionInfiniteScroll 4 | --- 5 | -------------------------------------------------------------------------------- /demos/directive/list/animated/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: animated 3 | component: ionList 4 | --- 5 |
    6 | 7 |

    Animated List

    8 |
    9 | 10 | 11 | 12 | 14 | {{item}} 15 | 25 | 26 | 27 | 28 | 29 |
    30 | -------------------------------------------------------------------------------- /demos/directive/list/animated/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: animated 3 | component: ionList 4 | --- 5 | angular.module('animated', ['ionic']) 6 | .controller('AnimatedListCtrl', function($scope, $timeout) { 7 | var nextItem = 0; 8 | $scope.items = []; 9 | for (var i=0; i < 5; i++) { 10 | $scope.items.push('Item ' + (nextItem++)); 11 | } 12 | 13 | $scope.addItem = function(atIndex) { 14 | $scope.items.splice(atIndex + 1, 0, 'Item ' + nextItem); 15 | nextItem++; 16 | }; 17 | }); 18 | 19 | -------------------------------------------------------------------------------- /demos/directive/list/animated/style.css: -------------------------------------------------------------------------------- 1 | --- 2 | name: animated 3 | component: ionList 4 | --- 5 | .animated-item .item-note .button { 6 | margin-top: 10px; 7 | } 8 | .animated-item { 9 | line-height: 52px; 10 | max-height: 52px; 11 | padding-top: 0; 12 | padding-bottom: 0; 13 | -webkit-transition: all 0.15s linear; 14 | -moz-transition: all 0.15s linear; 15 | transition: all 0.15s linear; 16 | } 17 | .animated-item.ng-leave.ng-leave-active, 18 | .animated-item.ng-enter { 19 | opacity: 0; 20 | max-height: 0; 21 | } 22 | .animated-item.ng-leave, 23 | .animated-item.ng-enter.ng-enter-active { 24 | opacity: 1; 25 | max-height: 52px; 26 | } 27 | -------------------------------------------------------------------------------- /demos/directive/list/animated/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: animated 3 | component: ionList 4 | --- 5 | 6 | it('should add item below Item 0', function(){ 7 | var ele = element.all(by.css('.list .button')); 8 | ele.get(0).click(); 9 | }); 10 | 11 | it('should remove Item 0', function(){ 12 | var ele = element.all(by.css('.list .button')); 13 | ele.get(1).click(); 14 | }); 15 | -------------------------------------------------------------------------------- /demos/directive/list/reorderDelete/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: reorderDelete 3 | component: ionList 4 | --- 5 |
    6 | 7 | 8 | Delete 9 | 10 |

    List

    11 | 12 | Reorder 13 | 14 |
    15 | 16 | 18 | 20 | 21 | 22 |

    Item {{item}}

    23 |

    Here's an item description.

    24 | 26 | Share 27 | 28 | 30 | Edit 31 | 32 | 34 | 35 | 37 | 38 | 39 |
    40 |
    41 |
    42 |
    43 | -------------------------------------------------------------------------------- /demos/directive/list/reorderDelete/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: reorderDelete 3 | component: ionList 4 | --- 5 | angular.module('reorderDelete', ['ionic']) 6 | .controller('ListCtrl', function($scope, $ionicPopup) { 7 | $scope.data = { 8 | showReorder: false, 9 | showDelete: false 10 | }; 11 | 12 | $scope.items = []; 13 | for (var i = 0; i < 20; i++) { 14 | $scope.items.push(i); 15 | } 16 | 17 | $scope.toggleDelete = function() { 18 | $scope.data.showReorder = false; 19 | $scope.data.showDelete = !$scope.data.showDelete; 20 | }; 21 | $scope.toggleReorder = function() { 22 | $scope.data.showDelete = false; 23 | $scope.data.showReorder = !$scope.data.showReorder; 24 | }; 25 | 26 | $scope.share = function(item) { 27 | alert('Sharing ' + item); 28 | }; 29 | $scope.edit = function(item) { 30 | alert('Editing ' + item); 31 | }; 32 | 33 | $scope.reorderItem = function(item, fromIndex, toIndex) { 34 | $scope.items.splice(fromIndex, 1) 35 | $scope.items.splice(toIndex, 0, item) 36 | }; 37 | }); 38 | -------------------------------------------------------------------------------- /demos/directive/list/reorderDelete/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: reorderDelete 3 | component: ionList 4 | --- 5 | 6 | it('should show reorder icons', function(){ 7 | var ele = element.all(by.css('.bar-header .button')); 8 | ele.get(1).click(); 9 | }); 10 | 11 | it('should hide reorder icons', function(){ 12 | var ele = element.all(by.css('.bar-header .button')); 13 | ele.get(1).click(); 14 | }); 15 | 16 | it('should show delete icons', function(){ 17 | var ele = element.all(by.css('.bar-header .button')); 18 | ele.get(0).click(); 19 | }); 20 | 21 | it('should hide delete icons', function(){ 22 | var ele = element.all(by.css('.bar-header .button')); 23 | ele.get(0).click(); 24 | }); 25 | -------------------------------------------------------------------------------- /demos/directive/radio/chooseOne/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: chooseOne 3 | component: ionRadio 4 | --- 5 | 6 |

    Radios

    7 |
    8 | 9 |

    10 | Your Choice: {{choice}} 11 |

    12 | One 13 | Two 14 | Three 15 | Four 16 | Five 17 |
    18 | -------------------------------------------------------------------------------- /demos/directive/radio/chooseOne/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: chooseOne 3 | component: ionRadio 4 | --- 5 | angular.module('chooseOne', ['ionic']) 6 | .controller('ChooseOneCtrl', function($scope) { 7 | $scope.choice = 'two'; 8 | }); 9 | -------------------------------------------------------------------------------- /demos/directive/radio/chooseOne/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: chooseOne 3 | component: ionRadio 4 | --- 5 | 6 | it('should check 3rd radio by clicking its label', function(){ 7 | var ele = element.all(by.css('label.item-radio')); 8 | ele.get(2).click(); 9 | }); 10 | 11 | it('should check 4th radio by clicking its label', function(){ 12 | var ele = element.all(by.css('label.item-radio')); 13 | ele.get(3).click(); 14 | }); 15 | -------------------------------------------------------------------------------- /demos/directive/refresher/refreshList/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: refreshList 3 | component: ionRefresher 4 | --- 5 | 6 |

    Pull to Refresh

    7 |
    8 | 9 | 10 | 11 | 15 | 16 | 17 | 18 | {{item}} 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /demos/directive/refresher/refreshList/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: refreshList 3 | component: ionRefresher 4 | --- 5 | angular.module('refreshList', ['ionic']) 6 | .controller('RefresherCtrl', function($scope, $timeout) { 7 | $scope.items = ['Item 1', 'Item 2', 'Item 3']; 8 | 9 | $scope.doRefresh = function() { 10 | $timeout(function() { 11 | $scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); 12 | $scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); 13 | $scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); 14 | $scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); 15 | $scope.$broadcast('scroll.refreshComplete'); 16 | }, 1000); 17 | }; 18 | }); 19 | -------------------------------------------------------------------------------- /demos/directive/refresher/refreshList/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: refreshList 3 | component: ionRefresher 4 | --- 5 | -------------------------------------------------------------------------------- /demos/directive/sideMenus/navWithMenu/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: navWithMenu 3 | component: ionSideMenus 4 | --- 5 | 6 | it('should nav to Search from left menu', function(){ 7 | var ele = element.all(by.css('button[menu-toggle="left"]')); 8 | ele.get(0).click(); 9 | 10 | browser.sleep(500).then(function(){ 11 | var itemEle = element.all(by.css('ion-side-menu[side="left"] a')); 12 | itemEle.get(0).click(); 13 | }); 14 | }); 15 | 16 | it('should nav to Browse from left menu', function(){ 17 | var ele = element.all(by.css('button[menu-toggle="left"]')); 18 | ele.get(0).click(); 19 | 20 | browser.sleep(500).then(function(){ 21 | var itemEle = element.all(by.css('ion-side-menu[side="left"] a')); 22 | itemEle.get(1).click(); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /demos/directive/sideMenus/simple/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionSideMenus 4 | --- 5 | 6 | 7 | 8 | 9 |
    10 |
    11 | 12 |
    13 |
    14 |

    15 | Side 16 |

    17 |
    18 | 19 |

    Slide the content or press the button on the header to open a side menu.

    20 |
    21 |
    22 | 23 | 24 | 25 | 26 | 27 | 28 | Close Menu 29 | 30 | 31 | 32 | 33 |
    34 | -------------------------------------------------------------------------------- /demos/directive/sideMenus/simple/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionSideMenus 4 | --- 5 | var app = angular.module('simple', ['ionic']); 6 | app.controller('SideMenusSimpleCtrl', function($scope, $ionicSideMenuDelegate) { 7 | 8 | $scope.toggleLeft = function() { 9 | $ionicSideMenuDelegate.toggleLeft(); 10 | }; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /demos/directive/sideMenus/simple/style.css: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionSideMenus 4 | --- 5 | .menu-left .scroll-content { 6 | background-color: #f4f4f4; 7 | } 8 | -------------------------------------------------------------------------------- /demos/directive/sideMenus/simple/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionSideMenus 4 | --- 5 | it('should show left menu', function(){ 6 | var ele = element.all(by.css('.bar-header .button')); 7 | ele.get(0).click(); 8 | }); 9 | 10 | it('should hide left menu by clicking header button', function(){ 11 | var ele = element.all(by.css('.bar-header .button')); 12 | ele.get(0).click(); 13 | }); 14 | 15 | it('should show left menu', function(){ 16 | var ele = element.all(by.css('.bar-header .button')); 17 | ele.get(0).click(); 18 | }); 19 | 20 | it('should hide left menu by close menu item', function(){ 21 | var ele = element.all(by.css('ion-side-menu[side="left"] a')); 22 | ele.get(0).click(); 23 | }); 24 | -------------------------------------------------------------------------------- /demos/directive/slideBox/appIntro/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: appIntro 3 | component: ionSlideBox 4 | --- 5 | angular.module('appIntro', ['ionic']) 6 | 7 | .config(function ($stateProvider, $urlRouterProvider) { 8 | 9 | $stateProvider 10 | .state('intro', { 11 | url: '/', 12 | templateUrl: 'intro.html', 13 | controller: 'IntroCtrl' 14 | }) 15 | .state('main', { 16 | url: '/main', 17 | templateUrl: 'main.html', 18 | controller: 'MainCtrl' 19 | }); 20 | 21 | $urlRouterProvider.otherwise("/"); 22 | 23 | }) 24 | 25 | .controller('IntroCtrl', function ($scope, $state, $ionicSlideBoxDelegate) { 26 | 27 | // Called to navigate to the main app 28 | $scope.startApp = function () { 29 | $state.go('main'); 30 | }; 31 | $scope.next = function () { 32 | $ionicSlideBoxDelegate.select($ionicSlideBoxDelegate.next()); 33 | }; 34 | $scope.previous = function () { 35 | $ionicSlideBoxDelegate.select($ionicSlideBoxDelegate.previous()); 36 | }; 37 | 38 | // Called each time the slide changes 39 | $scope.slideChanged = function (index) { 40 | $scope.slideIndex = index; 41 | }; 42 | }) 43 | 44 | .controller('MainCtrl', function ($scope, $state) { 45 | $scope.toIntro = function () { 46 | $state.go('intro'); 47 | }; 48 | }); 49 | -------------------------------------------------------------------------------- /demos/directive/slideBox/appIntro/style.css: -------------------------------------------------------------------------------- 1 | --- 2 | name: appIntro 3 | component: ionSlideBox 4 | --- 5 | .slider { 6 | height: 100%; 7 | } 8 | .slider-slide { 9 | padding-top: 80px; 10 | background-color: #fff; 11 | color: #000; 12 | text-align: center; 13 | font-weight: 300; 14 | font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; 15 | } 16 | #logo { 17 | margin: 30px 0px; 18 | } 19 | #list { 20 | margin: 30px auto; 21 | width: 170px; 22 | font-size: 20px; 23 | } 24 | #list ol { 25 | margin-top: 30px; 26 | } 27 | #list ol li { 28 | margin: 10px 0px; 29 | list-style: decimal; 30 | text-align: left; 31 | } 32 | -------------------------------------------------------------------------------- /demos/directive/slideBox/appIntro/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: appIntro 3 | component: ionSlideBox 4 | --- 5 | it('should go to slide 2', function(){ 6 | var ele = element(by.css('.right-buttons .button')); 7 | ele.click(); 8 | }); 9 | 10 | it('should go to slide 1', function(){ 11 | var ele = element(by.css('.left-buttons .button')); 12 | ele.click(); 13 | }); 14 | 15 | it('should go to slide 2', function(){ 16 | var ele = element(by.css('.right-buttons .button')); 17 | ele.click(); 18 | }); 19 | 20 | it('should go to slide 3', function(){ 21 | var ele = element(by.css('.right-buttons .button')); 22 | ele.click(); 23 | }); 24 | 25 | it('should go to main app', function(){ 26 | var ele = element(by.css('.right-buttons .button')); 27 | ele.click(); 28 | }); 29 | 30 | it('should start over', function(){ 31 | var ele = element(by.css('ion-nav-view .button')); 32 | ele.click(); 33 | }); 34 | -------------------------------------------------------------------------------- /demos/directive/textInput/floatingLabel/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: floatingLabel 3 | component: itemFloatingLabel 4 | --- 5 | 6 | 7 |

    8 | Text Input: Floating Label 9 |

    10 |
    11 | 12 | 13 | 14 |
    15 | 19 | 23 | 27 |
    28 | 29 |
    30 | -------------------------------------------------------------------------------- /demos/directive/textInput/floatingLabel/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: floatingLabel 3 | component: itemFloatingLabel 4 | --- 5 | 6 | var app = angular.module('floatingLabel', ['ionic']); 7 | 8 | app.controller('AppCtrl', function($scope) { 9 | 10 | $scope.favSong = "Tubthumping"; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /demos/directive/textInput/floatingLabel/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: floatingLabel 3 | component: itemFloatingLabel 4 | --- 5 | 6 | it('should enter text into floating label inputs', function(){ 7 | var ele = element.all(by.css('label.item-floating-label input, label.item-floating-label textarea')); 8 | ele.get(0).sendKeys('Dr. Pumpernickel'); 9 | ele.get(1).sendKeys('Round House Kicks'); 10 | }); 11 | 12 | it('should add and remove text from floating label inputs', function(){ 13 | var ele = element.all(by.css('label.item-floating-label input, label.item-floating-label textarea')); 14 | 15 | for(var x=0; x<'Dr. Pumpernickel'.length; x++) { 16 | ele.get(0).sendKeys(protractor.Key.BACK_SPACE); 17 | } 18 | 19 | ele.get(1).sendKeys(" To The Face"); 20 | 21 | for(var x=0; x<'Tubthumping'.length; x++) { 22 | ele.get(2).sendKeys(protractor.Key.BACK_SPACE); 23 | } 24 | 25 | }); 26 | -------------------------------------------------------------------------------- /demos/directive/toggle/simple/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionToggle 4 | --- 5 | 6 | 7 |

    8 | Toggle: Simple Usage 9 |

    10 |
    11 | 12 |

    Your pizza has {{toppings()}}!

    13 | 14 | Pepperoni? 15 | 16 | 17 | Sausage? 18 | 19 | 20 | Jalapeno? 21 | 22 | 23 | Anchovies? 24 | 25 |
    26 | -------------------------------------------------------------------------------- /demos/directive/toggle/simple/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionToggle 4 | --- 5 | 6 | var app = angular.module('simple', ['ionic']); 7 | app.controller('MainCtrl', function($scope) { 8 | $scope.pizza = { 9 | pepperoni: true, 10 | sausage: false, 11 | anchovies: true, 12 | jalapenos: false 13 | }; 14 | 15 | $scope.toppings = function() { 16 | var toppings = Object.keys($scope.pizza).filter(function(flavor) { 17 | return $scope.pizza[flavor]; 18 | }); 19 | if (toppings.length > 1) { 20 | toppings[toppings.length - 1] = 'and ' + toppings[toppings.length - 1]; 21 | } 22 | if (toppings.length > 2) { 23 | return toppings.join(', '); 24 | } else if (toppings.length) { 25 | return toppings.join(' '); 26 | } else { 27 | return 'nothing'; 28 | } 29 | }; 30 | }); 31 | -------------------------------------------------------------------------------- /demos/directive/toggle/simple/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: simple 3 | component: ionToggle 4 | --- 5 | 6 | it('should uncheck 1st and check 2nd checkbox by clicking its label', function(){ 7 | var ele = element.all(by.css('label.toggle')); 8 | ele.get(0).click(); 9 | ele.get(1).click(); 10 | }); 11 | 12 | it('should check 1st and uncheck 2nd checkbox by clicking its label', function(){ 13 | var ele = element.all(by.css('label.toggle')); 14 | ele.get(0).click(); 15 | ele.get(1).click(); 16 | }); 17 | -------------------------------------------------------------------------------- /demos/old/actionsheet/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Ionic Actionsheet 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |

    Action Sheet

    22 |
    23 | 24 | 25 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /demos/old/actionsheet/script.js: -------------------------------------------------------------------------------- 1 | angular.module('ionicApp', ['ionic']) 2 | 3 | .controller('AppCtrl', function ($scope, $ionicActionSheet) { 4 | 5 | $scope.showActionsheet = function () { 6 | 7 | $ionicActionSheet.show({ 8 | titleText: 'ActionSheet Example', 9 | buttons: [ 10 | { 11 | text: 'Share' 12 | }, 13 | { 14 | text: 'Move' 15 | }, 16 | ], 17 | destructiveText: 'Delete', 18 | cancelText: 'Cancel', 19 | cancel: function () { 20 | console.log('CANCELLED'); 21 | }, 22 | buttonClicked: function (index) { 23 | console.log('BUTTON CLICKED', index); 24 | return true; 25 | }, 26 | destructiveButtonClicked: function () { 27 | console.log('DESTRUCT'); 28 | return true; 29 | } 30 | }); 31 | }; 32 | 33 | 34 | }); -------------------------------------------------------------------------------- /demos/old/actionsheet/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/old/app-intro-walkthrough/script.js: -------------------------------------------------------------------------------- 1 | angular.module('ionicApp', ['ionic']) 2 | 3 | .config(function ($stateProvider, $urlRouterProvider) { 4 | 5 | $stateProvider 6 | .state('intro', { 7 | url: '/', 8 | templateUrl: 'intro.html', 9 | controller: 'IntroCtrl' 10 | }) 11 | .state('main', { 12 | url: '/main', 13 | templateUrl: 'main.html', 14 | controller: 'MainCtrl' 15 | }); 16 | 17 | $urlRouterProvider.otherwise("/"); 18 | 19 | }) 20 | 21 | .controller('IntroCtrl', function ($scope, $state, $ionicSlideBoxDelegate) { 22 | 23 | // Called to navigate to the main app 24 | $scope.startApp = function () { 25 | $state.go('main'); 26 | }; 27 | $scope.next = function () { 28 | $ionicSlideBoxDelegate.next(); 29 | }; 30 | $scope.previous = function () { 31 | $ionicSlideBoxDelegate.previous(); 32 | }; 33 | 34 | // Called each time the slide changes 35 | $scope.slideChanged = function (index) { 36 | $scope.slideIndex = index; 37 | }; 38 | }) 39 | 40 | .controller('MainCtrl', function ($scope, $state) { 41 | console.log('MainCtrl'); 42 | 43 | $scope.toIntro = function () { 44 | $state.go('intro'); 45 | }; 46 | }); 47 | -------------------------------------------------------------------------------- /demos/old/app-intro-walkthrough/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } 4 | .slider { 5 | height: 100%; 6 | } 7 | .slider-slide { 8 | padding-top: 80px; 9 | background-color: #fff; 10 | color: #000; 11 | text-align: center; 12 | font-weight: 300; 13 | font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; 14 | } 15 | #logo { 16 | margin: 30px 0px; 17 | } 18 | #list { 19 | margin: 30px auto; 20 | width: 170px; 21 | font-size: 20px; 22 | } 23 | #list ol { 24 | margin-top: 30px; 25 | } 26 | #list ol li { 27 | margin: 10px 0px; 28 | list-style: decimal; 29 | text-align: left; 30 | } -------------------------------------------------------------------------------- /demos/old/checkbox/script.js: -------------------------------------------------------------------------------- 1 | angular.module('ionicApp', ['ionic']) 2 | 3 | .controller('MainCtrl', function ($scope) { 4 | 5 | $scope.devList = [ 6 | { 7 | text: "HTML5", 8 | checked: true 9 | }, 10 | { 11 | text: "CSS3", 12 | checked: false 13 | }, 14 | { 15 | text: "JavaScript", 16 | checked: false 17 | } 18 | ]; 19 | 20 | $scope.pushNotificationChange = function () { 21 | console.log('Push Notification Change', $scope.pushNotification.checked); 22 | }; 23 | 24 | $scope.pushNotification = { 25 | checked: true 26 | }; 27 | $scope.emailNotification = 'Subscribed'; 28 | 29 | }); -------------------------------------------------------------------------------- /demos/old/checkbox/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/old/collection-repeat/style.css: -------------------------------------------------------------------------------- 1 | .button.button-icon.input-button { 2 | position: absolute; 3 | right: 0; 4 | top: 5px; 5 | color: #bbb; 6 | } 7 | .item img { 8 | height: 60px; 9 | width: 60px; 10 | float: left; 11 | margin-top: 20px; 12 | margin-right: 10px; 13 | } 14 | .list .my-item.item { 15 | left: 0; 16 | right: 0; 17 | padding-top: 0; 18 | padding-bottom: 0; 19 | } 20 | -------------------------------------------------------------------------------- /demos/old/flickr-search-example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Ionic Flickr 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |

    Flickr Search

    23 |
    24 | 25 | 33 | 34 | 35 |
    36 |
    37 | 38 |
    39 |
    40 |
    41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /demos/old/flickr-search-example/style.css: -------------------------------------------------------------------------------- 1 | #search-input { 2 | text-align: center; 3 | } 4 | 5 | #photos { 6 | margin: auto; 7 | } 8 | 9 | .photo { 10 | float: left; 11 | overflow: hidden; 12 | margin: 1px; 13 | width: 100px; 14 | height: 100px; 15 | } 16 | .photo img { 17 | min-width: 100%; 18 | min-height: 100%; 19 | max-width: 150%; 20 | max-height: 150%; 21 | } 22 | 23 | #search-bar { 24 | position: absolute; 25 | top: 44px; 26 | z-index: 3; 27 | width: 100%; 28 | height: 40px; 29 | background: none; 30 | } 31 | #search-bar .item { 32 | border: none; 33 | background: none; 34 | } 35 | #content { 36 | top: 44px; 37 | padding-top: 45px; 38 | padding-bottom: 20px; 39 | } -------------------------------------------------------------------------------- /demos/old/frosted-glass-effect/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Ionic Frosted Glass 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
    24 |

    Blurred!

    25 |
    26 | 27 |
      28 |
    1. 29 |
    30 |
    31 | 32 | 33 | 34 |
    35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /demos/old/frosted-glass-effect/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } 4 | .messages { 5 | margin: 0; 6 | padding: 0; 7 | list-style-type: none; 8 | } 9 | .messages li { 10 | display: block; 11 | float: left; 12 | clear: both; 13 | margin: 0 0 1rem 0; 14 | padding: 0; 15 | max-width: 65%; 16 | } 17 | .messages li:nth-child(even) { 18 | float: right; 19 | } 20 | .messages li:nth-child(even) img { 21 | float: right; 22 | } 23 | .messages p { 24 | margin: 0; 25 | padding: .6875rem; 26 | border-radius: .75rem; 27 | background: #e6e5eb; 28 | color: #383641; 29 | font-size: .875rem; 30 | } 31 | .messages li:nth-child(even) p { 32 | background: #158ffe; 33 | color: #fff; 34 | } 35 | .messages img { 36 | display: block; 37 | max-width: 65%; 38 | border-radius: .75rem; 39 | } -------------------------------------------------------------------------------- /demos/old/google-maps/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Ionic Google Map 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |

    Map

    23 |
    24 | 25 | 26 |
    27 |
    28 | 29 | 30 | Find Me 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /demos/old/google-maps/script.js: -------------------------------------------------------------------------------- 1 | angular.module('ionicApp', ['ionic']) 2 | 3 | .controller('MapCtrl', function ($scope, $ionicLoading) { 4 | function initialize() { 5 | var mapOptions = { 6 | center: new google.maps.LatLng(43.07493, -89.381388), 7 | zoom: 16, 8 | mapTypeId: google.maps.MapTypeId.ROADMAP 9 | }; 10 | var map = new google.maps.Map(document.getElementById("map"), 11 | mapOptions); 12 | 13 | // Stop the side bar from dragging when mousedown/tapdown on the map 14 | google.maps.event.addDomListener(document.getElementById('map'), 'mousedown', function (e) { 15 | e.preventDefault(); 16 | return false; 17 | }); 18 | 19 | $scope.map = map; 20 | } 21 | google.maps.event.addDomListener(window, 'load', initialize); 22 | 23 | $scope.centerOnMe = function () { 24 | if (!$scope.map) { 25 | return; 26 | } 27 | 28 | $scope.loading = $ionicLoading.show({ 29 | content: 'Getting current location...', 30 | showBackdrop: false 31 | }); 32 | 33 | navigator.geolocation.getCurrentPosition(function (pos) { 34 | $scope.map.setCenter(new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude)); 35 | $scope.loading.hide(); 36 | }, function (error) { 37 | alert('Unable to get location: ' + error.message); 38 | }); 39 | }; 40 | }); -------------------------------------------------------------------------------- /demos/old/google-maps/style.css: -------------------------------------------------------------------------------- 1 | #map { 2 | width: 100%; 3 | height: 100%; 4 | } 5 | .scroll { 6 | height: 100%; 7 | } -------------------------------------------------------------------------------- /demos/old/lists/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Ionic List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
    22 | 23 |
    24 |

    Ionic Delete/Option Buttons

    25 |
    26 | 27 | 28 | 29 | 30 | 31 | 32 | Item {{ item.id }} 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /demos/old/lists/script.js: -------------------------------------------------------------------------------- 1 | angular.module('ionicApp', ['ionic']) 2 | 3 | .controller('MyCtrl', function ($scope) { 4 | 5 | $scope.data = { 6 | showDelete: false 7 | }; 8 | 9 | $scope.itemButtons = [ 10 | { 11 | text: 'Edit', 12 | type: 'button-assertive', 13 | onTap: function (item) { 14 | alert('Edit Item: ' + item.id); 15 | } 16 | }, 17 | { 18 | text: 'Share', 19 | type: 'button-calm', 20 | onTap: function (item) { 21 | alert('Share Item: ' + item.id); 22 | } 23 | } 24 | ]; 25 | 26 | $scope.onItemDelete = function (item) { 27 | $scope.items.splice($scope.items.indexOf(item), 1); 28 | }; 29 | 30 | $scope.items = [ 31 | { 32 | id: 1 33 | }, 34 | { 35 | id: 2 36 | }, 37 | { 38 | id: 3 39 | }, 40 | { 41 | id: 4 42 | }, 43 | { 44 | id: 5 45 | }, 46 | { 47 | id: 6 48 | }, 49 | { 50 | id: 7 51 | }, 52 | { 53 | id: 8 54 | }, 55 | { 56 | id: 9 57 | }, 58 | { 59 | id: 10 60 | } 61 | ]; 62 | 63 | }); -------------------------------------------------------------------------------- /demos/old/lists/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/old/loading-bar/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Ionic Loading Bar 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |

    Hello!

    22 |
    23 | 24 |
    25 | Loading... 26 |
    27 | 28 | 29 | Toggle me to toggle loading! 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /demos/old/loading-bar/script.js: -------------------------------------------------------------------------------- 1 | angular.module('ionicApp', ['ionic']) 2 | 3 | .controller('MainCtrl', ['$scope', 4 | function ($scope) { 5 | $scope.data = { 6 | isLoading: false 7 | }; 8 | }]); -------------------------------------------------------------------------------- /demos/old/loading-bar/style.css: -------------------------------------------------------------------------------- 1 | .bar.bar-loading { 2 | display: block; 3 | height: 24px; 4 | /* starts right below a normal header */ 5 | top: 44px; 6 | /* make the text centered vertically and horizontally */ 7 | text-align: center; 8 | padding: 0; 9 | line-height: 24px; 10 | /* transition 'sliding down' (check below)*/ 11 | -webkit-transition: 200ms all; 12 | } 13 | /* 14 | * make the content's top changes animate. 15 | * might not always look good, but looks 16 | * good when our loader is added & removed 17 | */ 18 | 19 | .has-header { 20 | -webkit-transition: 200ms top; 21 | } 22 | .has-header.has-loading { 23 | /* 44px (header) + 24px */ 24 | top: 68px; 25 | } 26 | /* make loading bar slide up/down */ 27 | 28 | .bar-loading.ng-enter, 29 | .bar-loading.ng-leave.ng-leave-active { 30 | height: 0; 31 | border-width: 0px; 32 | } 33 | .bar-loading.ng-enter.ng-enter-active, 34 | .bar-loading.ng-leave { 35 | height: 24px; 36 | border-width: 1px; 37 | } -------------------------------------------------------------------------------- /demos/old/modal/script.js: -------------------------------------------------------------------------------- 1 | angular.module('ionicApp', ['ionic']) 2 | 3 | .controller('AppCtrl', function ($scope, $ionicModal) { 4 | 5 | $scope.contacts = [ 6 | { 7 | name: 'Gordon Freeman' 8 | }, 9 | { 10 | name: 'Barney Calhoun' 11 | }, 12 | { 13 | name: 'Lamarr the Headcrab' 14 | }, 15 | ]; 16 | $ionicModal.fromTemplateUrl('modal.html', function (modal) { 17 | $scope.modal = modal; 18 | }, { 19 | animation: 'slide-in-up', 20 | focusFirstInput: true 21 | }); 22 | 23 | }) 24 | 25 | .controller('ModalCtrl', function ($scope) { 26 | 27 | $scope.newUser = {}; 28 | 29 | $scope.createContact = function () { 30 | console.log('Create Contact', $scope.newUser); 31 | $scope.modal.hide(); 32 | }; 33 | 34 | }); -------------------------------------------------------------------------------- /demos/old/modal/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/old/popup/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Ionic Popup 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /demos/old/popup/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/old/pull-to-refresh/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Ionic Template 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |

    Refresher

    22 |
    23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | {{item}} 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /demos/old/pull-to-refresh/script.js: -------------------------------------------------------------------------------- 1 | angular.module('ionicApp', ['ionic']) 2 | 3 | .controller('MyCtrl', function($scope, $timeout) { 4 | $scope.myTitle = 'Template'; 5 | 6 | $scope.items = ['Item 1', 'Item 2', 'Item 3']; 7 | 8 | 9 | $scope.doRefresh = function() { 10 | 11 | console.log('Refreshing!'); 12 | $timeout( function() { 13 | 14 | $scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); 15 | $scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); 16 | $scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); 17 | $scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); 18 | 19 | //Stop the ion-refresher from spinning 20 | $scope.$broadcast('scroll.refreshComplete'); 21 | 22 | }, 1000); 23 | 24 | }; 25 | 26 | }); -------------------------------------------------------------------------------- /demos/old/pull-to-refresh/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/old/radio-buttons/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Ionic Radio Buttons 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |

    Radio Buttons

    22 |
    23 | 24 | 25 | 26 |
    27 | 28 |
    29 | Clientside, Selected Value: {{ data.clientSide }} 30 |
    31 | 32 | 33 | {{ item.text }} 34 | 35 | 36 |
    37 | Serverside, Selected Value: {{ data.serverSide }} 38 |
    39 | 40 | 41 | {{ item.text }} 42 | 43 | 44 |
    45 | 46 |
    47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /demos/old/radio-buttons/script.js: -------------------------------------------------------------------------------- 1 | angular.module('ionicApp', ['ionic']) 2 | 3 | .controller('MainCtrl', function ($scope) { 4 | 5 | $scope.clientSideList = [ 6 | { 7 | text: "Backbone", 8 | value: "bb" 9 | }, 10 | { 11 | text: "Angular", 12 | value: "ng" 13 | }, 14 | { 15 | text: "Ember", 16 | value: "em" 17 | }, 18 | { 19 | text: "Knockout", 20 | value: "ko" 21 | } 22 | ]; 23 | 24 | $scope.serverSideList = [ 25 | { 26 | text: "Go", 27 | value: "go" 28 | }, 29 | { 30 | text: "Python", 31 | value: "py" 32 | }, 33 | { 34 | text: "Ruby", 35 | value: "rb" 36 | }, 37 | { 38 | text: "Java", 39 | value: "jv" 40 | } 41 | ]; 42 | 43 | $scope.data = { 44 | clientSide: 'ng' 45 | }; 46 | 47 | $scope.serverSideChange = function (item) { 48 | console.log("Selected Serverside, text:", item.text, "value:", item.value); 49 | }; 50 | 51 | }); -------------------------------------------------------------------------------- /demos/old/radio-buttons/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/old/shrinking-header/style.css: -------------------------------------------------------------------------------- 1 | .fake-statusbar { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | z-index: 4; 6 | box-sizing: border-box; 7 | padding: 2px 3px 3px 3px; 8 | max-height: 20px; 9 | width: 100%; 10 | height: 20px; 11 | color: #fff; 12 | font-size: 12px; 13 | } 14 | .fake-statusbar .time { 15 | position: absolute; 16 | width: 100%; 17 | height: 100%; 18 | text-align: center; 19 | } 20 | .fake-statusbar .pull-left { 21 | float: left; 22 | } 23 | .fake-statusbar .pull-right { 24 | float: right; 25 | } 26 | .bar-header { 27 | height: 64px !important; 28 | } 29 | .bar-header > * { 30 | margin-top: 20px !important; 31 | } -------------------------------------------------------------------------------- /demos/old/side-menu-and-navigation/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/old/sign-in-then-tabs/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/old/starter-template/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Ionic Starter Template 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 |

    {{myTitle}}

    25 |
    26 | 27 | 28 |

    Content

    29 |
    30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /demos/old/starter-template/script.js: -------------------------------------------------------------------------------- 1 | angular.module('ionicApp', ['ionic']) 2 | 3 | .controller('MyCtrl', function($scope) { 4 | $scope.myTitle = 'Template'; 5 | 6 | $scope.doSomething = function() { 7 | $scope.myTitle = $scope.myTitle + ' something'; 8 | }; 9 | }); -------------------------------------------------------------------------------- /demos/old/starter-template/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/old/tabs-and-navigation/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/old/thumbnail-list/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Ionic Simple List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |

    Canadian Music

    22 |
    23 | 24 | 25 | 26 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /demos/old/thumbnail-list/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/old/toggle/script.js: -------------------------------------------------------------------------------- 1 | angular.module('ionicApp', ['ionic']) 2 | 3 | .controller('MainCtrl', function ($scope) { 4 | 5 | $scope.settingsList = [ 6 | { 7 | text: "Wireless", 8 | checked: true 9 | }, 10 | { 11 | text: "GPS", 12 | checked: false 13 | }, 14 | { 15 | text: "Bluetooth", 16 | checked: false 17 | } 18 | ]; 19 | 20 | $scope.pushNotificationChange = function () { 21 | console.log('Push Notification Change', $scope.pushNotification.checked); 22 | }; 23 | 24 | $scope.pushNotification = { 25 | checked: true 26 | }; 27 | $scope.emailNotification = 'Subscribed'; 28 | 29 | }); -------------------------------------------------------------------------------- /demos/old/toggle/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | cursor: url('http://ionicframework.com/img/finger.png'), auto; 3 | } -------------------------------------------------------------------------------- /demos/service/actionSheet/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: takeAction 3 | component: $ionicActionSheet 4 | --- 5 | 6 |

    Action

    7 |
    8 | 9 |
    10 | Take Action! 11 |
    12 |
    13 |
    14 | User Log 15 |
    16 |
    17 |
    18 | {{message.text}} 19 |
    20 |
    21 |
    22 |
    23 | -------------------------------------------------------------------------------- /demos/service/actionSheet/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: takeAction 3 | component: $ionicActionSheet 4 | --- 5 | angular.module('takeAction', ['ionic']) 6 | .controller('ActionSheetCtrl', function($scope, $ionicActionSheet) { 7 | $scope.messages = []; 8 | $scope.takeAction = function() { 9 | $ionicActionSheet.show({ 10 | buttons: [ 11 | { text: 'Share ' }, 12 | { text: 'Edit ' } 13 | ], 14 | destructiveText: 'Delete ', 15 | titleText: 'Modify your album', 16 | cancelText: 'Cancel', 17 | cancel: function() { 18 | $scope.message('Cancel'); 19 | return true; 20 | }, 21 | buttonClicked: function(index) { 22 | $scope.message(index === 0 ? 'Share' : 'Edit'); 23 | return true; 24 | }, 25 | destructiveButtonClicked: function() { 26 | $scope.message('Delete'); 27 | return true; 28 | } 29 | }); 30 | }; 31 | $scope.message = function(msg) { 32 | $scope.messages.unshift({ 33 | text: 'User pressed ' + msg 34 | }); 35 | }; 36 | }); 37 | -------------------------------------------------------------------------------- /demos/service/actionSheet/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: takeAction 3 | component: $ionicActionSheet 4 | --- 5 | 6 | it('should open up actionsheet', function(){ 7 | var ele = element(by.css('.button')); 8 | ele.click(); 9 | }); 10 | 11 | it('should close when clicking backdrop', function(){ 12 | var ele = element(by.css('.action-sheet-backdrop')); 13 | ele.click(); 14 | }); 15 | 16 | it('should open up actionsheet again', function(){ 17 | var ele = element(by.css('.button')); 18 | ele.click(); 19 | }); 20 | 21 | it('should click the share button', function(){ 22 | var ele = element.all(by.css('.action-sheet-group .button')); 23 | ele.get(0).click(); 24 | }); 25 | -------------------------------------------------------------------------------- /demos/service/loading/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: complete 3 | component: $ionicLoading 4 | --- 5 |
    6 | 7 |

    Loading Demo

    8 | 9 | Load 10 | 11 |
    12 | 13 |
    14 | 18 | 22 | 26 | 28 | Hide Backdrop? 29 | 30 |
    31 |
    32 |
    33 | -------------------------------------------------------------------------------- /demos/service/loading/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: complete 3 | component: $ionicLoading 4 | --- 5 | angular.module('complete', ['ionic']) 6 | .controller('LoadingCtrl', function($scope, $ionicLoading) { 7 | $scope.loadingOptions = { 8 | duration: 1000, 9 | delay: 0, 10 | template: '\n
    \nLoading...', 11 | noBackdrop: false 12 | }; 13 | $scope.showLoading = function() { 14 | $ionicLoading.show($scope.loadingOptions); 15 | }; 16 | }); 17 | -------------------------------------------------------------------------------- /demos/service/loading/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: complete 3 | component: $ionicLoading 4 | --- 5 | -------------------------------------------------------------------------------- /demos/service/popover/index.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: popover 3 | component: $ionicPopover 4 | --- 5 | 6 | angular.module('popover', ['ionic']) 7 | 8 | .controller('HeaderCtrl', function($scope, $ionicPopover) { 9 | 10 | $scope.openPopover = function($event) { 11 | $scope.popover.show($event); 12 | }; 13 | $ionicPopover.fromTemplateUrl('popover.html', function(popover) { 14 | $scope.popover = popover; 15 | }); 16 | 17 | $scope.openPopover2 = function($event) { 18 | $scope.popover2.show($event); 19 | }; 20 | $ionicPopover.fromTemplateUrl('popover2.html', function(popover) { 21 | $scope.popover2 = popover; 22 | }); 23 | }) 24 | 25 | .controller('PlatformCtrl', function($scope, $ionicPopover) { 26 | 27 | $scope.setPlatform = function(p) { 28 | document.body.classList.remove('platform-ios'); 29 | document.body.classList.remove('platform-android'); 30 | document.body.classList.add('platform-' + p); 31 | }; 32 | 33 | }); 34 | -------------------------------------------------------------------------------- /demos/service/popover/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: popover 3 | component: $ionicPopover 4 | --- 5 | 6 | it('should open left side ios popover', function(){ 7 | element(by.css('#ios')).click(); 8 | element(by.css('#icon-btn')).click(); 9 | }); 10 | 11 | it('should close ios popover when clicking backdrop', function(){ 12 | element(by.css('.popover-backdrop.active')).click(); 13 | }); 14 | 15 | it('should open middle ios popover', function(){ 16 | element(by.css('#mid-btn')).click(); 17 | }); 18 | 19 | it('should open right ios popover', function(){ 20 | element(by.css('.popover-backdrop.active')).click(); 21 | element(by.css('#right-btn')).click(); 22 | }); 23 | 24 | it('should open left side android popover', function(){ 25 | element(by.css('.popover-backdrop.active')).click(); 26 | element(by.css('#android')).click(); 27 | element(by.css('#icon-btn')).click(); 28 | }); 29 | 30 | it('should close android popover when clicking backdrop', function(){ 31 | element(by.css('.popover-backdrop.active')).click(); 32 | }); 33 | 34 | it('should open middle android popover', function(){ 35 | element(by.css('#mid-btn')).click(); 36 | }); 37 | 38 | it('should open right android popover', function(){ 39 | element(by.css('.popover-backdrop.active')).click(); 40 | element(by.css('#right-btn')).click(); 41 | }); 42 | -------------------------------------------------------------------------------- /demos/service/popup/popping/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: popping 3 | component: $ionicPopup 4 | --- 5 | 6 | 7 |

    Popups

    8 |
    9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 22 | 23 | 26 | -------------------------------------------------------------------------------- /demos/service/popup/popping/test.scenario.js: -------------------------------------------------------------------------------- 1 | --- 2 | name: popping 3 | component: $ionicPopup 4 | --- 5 | 6 | it('should open confirm popup', function(){ 7 | var ele = element.all(by.css('[ng-click="showConfirm()"]')); 8 | ele.get(0).click(); 9 | }); 10 | 11 | it('should cancel confirm popup', function(){ 12 | var ele = element.all(by.css('.popup-buttons .button')); 13 | ele.get(0).click(); 14 | }); 15 | 16 | it('should open prompt popup and enter input', function(){ 17 | var ele = element.all(by.css('[ng-click="showPrompt()"]')); 18 | ele.get(0).click(); 19 | ele = element(by.model('data.response')); 20 | ele.sendKeys('Waffles'); 21 | }); 22 | 23 | it('should close prompt popup by clicking OK', function(){ 24 | var ele = element.all(by.css('.popup-buttons .button')); 25 | ele.get(1).click(); 26 | }); 27 | 28 | it('should open alert popup', function(){ 29 | var ele = element.all(by.css('[ng-click="showAlert()"]')); 30 | ele.get(0).click(); 31 | }); 32 | 33 | it('should close alert popup', function(){ 34 | var ele = element.all(by.css('.popup-buttons .button')); 35 | ele.get(0).click(); 36 | }); 37 | -------------------------------------------------------------------------------- /js/angular/controller/tabController.js: -------------------------------------------------------------------------------- 1 | IonicModule 2 | .controller('$ionicTab', [ 3 | '$scope', 4 | '$ionicHistory', 5 | '$attrs', 6 | '$location', 7 | '$state', 8 | function($scope, $ionicHistory, $attrs, $location, $state) { 9 | this.$scope = $scope; 10 | 11 | //All of these exposed for testing 12 | this.hrefMatchesState = function() { 13 | return $attrs.href && $location.path().indexOf( 14 | $attrs.href.replace(/^#/, '').replace(/\/$/, '') 15 | ) === 0; 16 | }; 17 | this.srefMatchesState = function() { 18 | return $attrs.uiSref && $state.includes($attrs.uiSref.split('(')[0]); 19 | }; 20 | this.navNameMatchesState = function() { 21 | return this.navViewName && $ionicHistory.isCurrentStateNavView(this.navViewName); 22 | }; 23 | 24 | this.tabMatchesState = function() { 25 | return this.hrefMatchesState() || this.srefMatchesState() || this.navNameMatchesState(); 26 | }; 27 | }]); 28 | -------------------------------------------------------------------------------- /js/angular/directive/itemFloatingLabel.js: -------------------------------------------------------------------------------- 1 | 2 | IonicModule 3 | .directive('itemFloatingLabel', function() { 4 | return { 5 | restrict: 'C', 6 | link: function(scope, element) { 7 | var el = element[0]; 8 | var input = el.querySelector('input, textarea'); 9 | var inputLabel = el.querySelector('.input-label'); 10 | 11 | if (!input || !inputLabel) return; 12 | 13 | var onInput = function() { 14 | if (input.value) { 15 | inputLabel.classList.add('has-input'); 16 | } else { 17 | inputLabel.classList.remove('has-input'); 18 | } 19 | }; 20 | 21 | input.addEventListener('input', onInput); 22 | 23 | var ngModelCtrl = jqLite(input).controller('ngModel'); 24 | if (ngModelCtrl) { 25 | ngModelCtrl.$render = function() { 26 | input.value = ngModelCtrl.$viewValue || ''; 27 | onInput(); 28 | }; 29 | } 30 | 31 | scope.$on('$destroy', function() { 32 | input.removeEventListener('input', onInput); 33 | }); 34 | } 35 | }; 36 | }); 37 | -------------------------------------------------------------------------------- /js/angular/directive/modal.js: -------------------------------------------------------------------------------- 1 | /* 2 | * We don't document the ionModal directive, we instead document 3 | * the $ionicModal service 4 | */ 5 | IonicModule 6 | .directive('ionModal', [function() { 7 | return { 8 | restrict: 'E', 9 | transclude: true, 10 | replace: true, 11 | controller: [function() {}], 12 | template: '' 16 | }; 17 | }]); 18 | -------------------------------------------------------------------------------- /js/angular/directive/modalView.js: -------------------------------------------------------------------------------- 1 | IonicModule 2 | .directive('ionModalView', function() { 3 | return { 4 | restrict: 'E', 5 | compile: function(element) { 6 | element.addClass('modal'); 7 | } 8 | }; 9 | }); 10 | -------------------------------------------------------------------------------- /js/angular/directive/navDirection.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name navDirection 4 | * @module ionic 5 | * @restrict A 6 | * 7 | * @description 8 | * The direction which the nav view transition should animate. Available options 9 | * are: `forward`, `back`, `enter`, `exit`, `swap`. 10 | * 11 | * @usage 12 | * 13 | * ```html 14 | * Home 15 | * ``` 16 | */ 17 | IonicModule 18 | .directive('navDirection', ['$ionicViewSwitcher', function($ionicViewSwitcher) { 19 | return { 20 | restrict: 'A', 21 | priority: 1000, 22 | link: function($scope, $element, $attr) { 23 | $element.bind('click', function() { 24 | $ionicViewSwitcher.nextDirection($attr.navDirection); 25 | }); 26 | } 27 | }; 28 | }]); 29 | -------------------------------------------------------------------------------- /js/angular/directive/navTransition.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name navTransition 4 | * @module ionic 5 | * @restrict A 6 | * 7 | * @description 8 | * The transition type which the nav view transition should use when it animates. 9 | * Current, options are `ios`, `android`, and `none`. More options coming soon. 10 | * 11 | * @usage 12 | * 13 | * ```html 14 | * Home 15 | * ``` 16 | */ 17 | IonicModule 18 | .directive('navTransition', ['$ionicViewSwitcher', function($ionicViewSwitcher) { 19 | return { 20 | restrict: 'A', 21 | priority: 1000, 22 | link: function($scope, $element, $attr) { 23 | $element.bind('click', function() { 24 | $ionicViewSwitcher.nextTransition($attr.navTransition); 25 | }); 26 | } 27 | }; 28 | }]); 29 | -------------------------------------------------------------------------------- /js/angular/directive/ngClick.js: -------------------------------------------------------------------------------- 1 | IonicModule 2 | 3 | .config(['$provide', function($provide) { 4 | $provide.decorator('ngClickDirective', ['$delegate', function($delegate) { 5 | // drop the default ngClick directive 6 | $delegate.shift(); 7 | return $delegate; 8 | }]); 9 | }]) 10 | 11 | /** 12 | * @private 13 | */ 14 | .factory('$ionicNgClick', ['$parse', function($parse) { 15 | return function(scope, element, clickExpr) { 16 | var clickHandler = angular.isFunction(clickExpr) ? 17 | clickExpr : 18 | $parse(clickExpr); 19 | 20 | element.on('click', function(event) { 21 | scope.$apply(function() { 22 | clickHandler(scope, {$event: (event)}); 23 | }); 24 | }); 25 | 26 | // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click 27 | // something else nearby. 28 | element.onclick = noop; 29 | }; 30 | }]) 31 | 32 | .directive('ngClick', ['$ionicNgClick', function($ionicNgClick) { 33 | return function(scope, element, attr) { 34 | $ionicNgClick(scope, element, attr.ngClick); 35 | }; 36 | }]) 37 | 38 | .directive('ionStopEvent', function() { 39 | return { 40 | restrict: 'A', 41 | link: function(scope, element, attr) { 42 | element.bind(attr.ionStopEvent, eventStopPropagation); 43 | } 44 | }; 45 | }); 46 | function eventStopPropagation(e) { 47 | e.stopPropagation(); 48 | } 49 | -------------------------------------------------------------------------------- /js/angular/directive/pane.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @ngdoc directive 4 | * @name ionPane 5 | * @module ionic 6 | * @restrict E 7 | * 8 | * @description A simple container that fits content, with no side effects. Adds the 'pane' class to the element. 9 | */ 10 | IonicModule 11 | .directive('ionPane', function() { 12 | return { 13 | restrict: 'E', 14 | link: function(scope, element) { 15 | element.addClass('pane'); 16 | } 17 | }; 18 | }); 19 | -------------------------------------------------------------------------------- /js/angular/directive/popover.js: -------------------------------------------------------------------------------- 1 | /* 2 | * We don't document the ionPopover directive, we instead document 3 | * the $ionicPopover service 4 | */ 5 | IonicModule 6 | .directive('ionPopover', [function() { 7 | return { 8 | restrict: 'E', 9 | transclude: true, 10 | replace: true, 11 | controller: [function() {}], 12 | template: '
    ' + 13 | '
    ' + 14 | '
    ' 15 | }; 16 | }]); 17 | -------------------------------------------------------------------------------- /js/angular/directive/popoverView.js: -------------------------------------------------------------------------------- 1 | IonicModule 2 | .directive('ionPopoverView', function() { 3 | return { 4 | restrict: 'E', 5 | compile: function(element) { 6 | element.append(jqLite('
    ')); 7 | element.addClass('popover'); 8 | } 9 | }; 10 | }); 11 | -------------------------------------------------------------------------------- /js/angular/directive/title.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name ionTitle 4 | * @module ionic 5 | * @restrict E 6 | * 7 | * Used for titles in header and nav bars. New in 1.2 8 | * 9 | * Identical to
    but with future compatibility for Ionic 2 10 | * 11 | * @usage 12 | * 13 | * ```html 14 | * 15 | * Hello 16 | * 17 | * ``` 18 | */ 19 | IonicModule 20 | .directive('ionTitle', [function() { 21 | return { 22 | restrict: 'E', 23 | compile: function(element) { 24 | element.addClass('title'); 25 | } 26 | }; 27 | }]); 28 | -------------------------------------------------------------------------------- /js/angular/main.js: -------------------------------------------------------------------------------- 1 | /* eslint no-unused-vars:0 */ 2 | var IonicModule = angular.module('ionic', ['ngAnimate', 'ngSanitize', 'ui.router', 'ngIOS9UIWebViewPatch']), 3 | extend = angular.extend, 4 | forEach = angular.forEach, 5 | isDefined = angular.isDefined, 6 | isNumber = angular.isNumber, 7 | isString = angular.isString, 8 | jqLite = angular.element, 9 | noop = angular.noop; 10 | -------------------------------------------------------------------------------- /js/angular/service/clickBlock.js: -------------------------------------------------------------------------------- 1 | IonicModule 2 | .factory('$ionicClickBlock', [ 3 | '$document', 4 | '$ionicBody', 5 | '$timeout', 6 | function($document, $ionicBody, $timeout) { 7 | var CSS_HIDE = 'click-block-hide'; 8 | var cbEle, fallbackTimer, pendingShow; 9 | 10 | function preventClick(ev) { 11 | ev.preventDefault(); 12 | ev.stopPropagation(); 13 | } 14 | 15 | function addClickBlock() { 16 | if (pendingShow) { 17 | if (cbEle) { 18 | cbEle.classList.remove(CSS_HIDE); 19 | } else { 20 | cbEle = $document[0].createElement('div'); 21 | cbEle.className = 'click-block'; 22 | $ionicBody.append(cbEle); 23 | cbEle.addEventListener('touchstart', preventClick); 24 | cbEle.addEventListener('mousedown', preventClick); 25 | } 26 | pendingShow = false; 27 | } 28 | } 29 | 30 | function removeClickBlock() { 31 | cbEle && cbEle.classList.add(CSS_HIDE); 32 | } 33 | 34 | return { 35 | show: function(autoExpire) { 36 | pendingShow = true; 37 | $timeout.cancel(fallbackTimer); 38 | fallbackTimer = $timeout(this.hide, autoExpire || 310, false); 39 | addClickBlock(); 40 | }, 41 | hide: function() { 42 | pendingShow = false; 43 | $timeout.cancel(fallbackTimer); 44 | removeClickBlock(); 45 | } 46 | }; 47 | }]); 48 | -------------------------------------------------------------------------------- /js/angular/service/decorators/compile.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @private 3 | * Parts of Ionic requires that $scope data is attached to the element. 4 | * We do not want to disable adding $scope data to the $element when 5 | * $compileProvider.debugInfoEnabled(false) is used. 6 | */ 7 | IonicModule.config(['$provide', function($provide) { 8 | $provide.decorator('$compile', ['$delegate', function($compile) { 9 | $compile.$$addScopeInfo = function $$addScopeInfo($element, scope, isolated, noTemplate) { 10 | var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope'; 11 | $element.data(dataName, scope); 12 | }; 13 | return $compile; 14 | }]); 15 | }]); 16 | -------------------------------------------------------------------------------- /js/angular/service/decorators/location.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @private 3 | */ 4 | IonicModule.config([ 5 | '$provide', 6 | function($provide) { 7 | function $LocationDecorator($location, $timeout) { 8 | 9 | $location.__hash = $location.hash; 10 | //Fix: when window.location.hash is set, the scrollable area 11 | //found nearest to body's scrollTop is set to scroll to an element 12 | //with that ID. 13 | $location.hash = function(value) { 14 | if (isDefined(value) && value.length > 0) { 15 | $timeout(function() { 16 | var scroll = document.querySelector('.scroll-content'); 17 | if (scroll) { 18 | scroll.scrollTop = 0; 19 | } 20 | }, 0, false); 21 | } 22 | return $location.__hash(value); 23 | }; 24 | 25 | return $location; 26 | } 27 | 28 | $provide.decorator('$location', ['$delegate', '$timeout', $LocationDecorator]); 29 | }]); 30 | -------------------------------------------------------------------------------- /js/angular/service/navViewDelegate.js: -------------------------------------------------------------------------------- 1 | 2 | IonicModule 3 | .service('$ionicNavViewDelegate', ionic.DelegateService([ 4 | 'clearCache' 5 | ])); 6 | 7 | -------------------------------------------------------------------------------- /js/angular/service/viewService.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @private 3 | * DEPRECATED, as of v1.0.0-beta14 ------- 4 | */ 5 | IonicModule 6 | .factory('$ionicViewService', ['$ionicHistory', '$log', function($ionicHistory, $log) { 7 | 8 | function warn(oldMethod, newMethod) { 9 | $log.warn('$ionicViewService' + oldMethod + ' is deprecated, please use $ionicHistory' + newMethod + ' instead: http://ionicframework.com/docs/nightly/api/service/$ionicHistory/'); 10 | } 11 | 12 | warn('', ''); 13 | 14 | var methodsMap = { 15 | getCurrentView: 'currentView', 16 | getBackView: 'backView', 17 | getForwardView: 'forwardView', 18 | getCurrentStateName: 'currentStateName', 19 | nextViewOptions: 'nextViewOptions', 20 | clearHistory: 'clearHistory' 21 | }; 22 | 23 | forEach(methodsMap, function(newMethod, oldMethod) { 24 | methodsMap[oldMethod] = function() { 25 | warn('.' + oldMethod, '.' + newMethod); 26 | return $ionicHistory[newMethod].apply(this, arguments); 27 | }; 28 | }); 29 | 30 | return methodsMap; 31 | 32 | }]); 33 | -------------------------------------------------------------------------------- /js/ionic.js: -------------------------------------------------------------------------------- 1 | 2 | // Create global ionic obj and its namespaces 3 | // build processes may have already created an ionic obj 4 | window.ionic = window.ionic || {}; 5 | window.ionic.views = {}; 6 | window.ionic.version = '<%= pkg.version %>'; 7 | -------------------------------------------------------------------------------- /js/views/modalView.js: -------------------------------------------------------------------------------- 1 | (function(ionic) { 2 | 'use strict'; 3 | 4 | ionic.views.Modal = ionic.views.View.inherit({ 5 | initialize: function(opts) { 6 | opts = ionic.extend({ 7 | focusFirstInput: false, 8 | unfocusOnHide: true, 9 | focusFirstDelay: 600, 10 | backdropClickToClose: true, 11 | hardwareBackButtonClose: true, 12 | }, opts); 13 | 14 | ionic.extend(this, opts); 15 | 16 | this.el = opts.el; 17 | }, 18 | show: function() { 19 | var self = this; 20 | 21 | if(self.focusFirstInput) { 22 | // Let any animations run first 23 | window.setTimeout(function() { 24 | var input = self.el.querySelector('input, textarea'); 25 | input && input.focus && input.focus(); 26 | }, self.focusFirstDelay); 27 | } 28 | }, 29 | hide: function() { 30 | // Unfocus all elements 31 | if(this.unfocusOnHide) { 32 | var inputs = this.el.querySelectorAll('input, textarea'); 33 | // Let any animations run first 34 | window.setTimeout(function() { 35 | for(var i = 0; i < inputs.length; i++) { 36 | inputs[i].blur && inputs[i].blur(); 37 | } 38 | }); 39 | } 40 | } 41 | }); 42 | 43 | })(ionic); 44 | -------------------------------------------------------------------------------- /js/views/view.js: -------------------------------------------------------------------------------- 1 | (function(ionic) { 2 | 'use strict'; 3 | ionic.views.View = function() { 4 | this.initialize.apply(this, arguments); 5 | }; 6 | 7 | ionic.views.View.inherit = ionic.inherit; 8 | 9 | ionic.extend(ionic.views.View.prototype, { 10 | initialize: function() {} 11 | }); 12 | 13 | })(window.ionic); 14 | -------------------------------------------------------------------------------- /package.js: -------------------------------------------------------------------------------- 1 | // package metadata file for Meteor.js 2 | var packageName = 'ionic-team:ionic'; // https://atmospherejs.com/ionic-team/ionic 3 | var where = 'client'; // where to install: 'client' or 'server'. For both, pass nothing. 4 | var version = '1.3.5'; 5 | 6 | Package.describe({ 7 | name: packageName, 8 | version: version, 9 | summary: 'Ionic Framework official Meteor package', 10 | git: 'git@github.com:ionic-team/ionic.git' 11 | }); 12 | 13 | Package.onUse(function(api) { 14 | api.versionsFrom(['METEOR@0.9.0', 'METEOR@1.0']); 15 | 16 | api.use('angular:angular@1.5.3', where); 17 | api.use('angular:angular-animate@1.5.3', where); 18 | api.use('angular:angular-sanitize@1.5.3', where); 19 | api.use('angularui:angular-ui-router@0.2.13_3', where); 20 | 21 | // In case the Meteor project has the `fastclick` package, 22 | // Load it first and cancel it (to use Ionic's one) 23 | api.use('urigo:cancel-fastclick@0.0.2', where); 24 | 25 | api.addFiles([ 26 | 'release/css/ionic.css', 27 | 'release/js/ionic.js', 28 | 'release/js/ionic-angular.js' 29 | ], where); 30 | 31 | api.addAssets([ 32 | 'release/fonts/ionicons.eot', 33 | 'release/fonts/ionicons.svg', 34 | 'release/fonts/ionicons.ttf', 35 | 'release/fonts/ionicons.woff' 36 | ], where) 37 | }); 38 | -------------------------------------------------------------------------------- /release/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/release/fonts/ionicons.eot -------------------------------------------------------------------------------- /release/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/release/fonts/ionicons.ttf -------------------------------------------------------------------------------- /release/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/release/fonts/ionicons.woff -------------------------------------------------------------------------------- /release/version.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.3.3", 3 | "codename": "germany", 4 | "date": "2017-02-22", 5 | "time": "20:52:24" 6 | } 7 | -------------------------------------------------------------------------------- /scripts/app-base/publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ARG_DEFS=( 4 | ) 5 | 6 | echo "##### " 7 | echo "##### app-base/publish.sh" 8 | echo "#####" 9 | 10 | function init { 11 | APPBASE_DIR=$HOME/starters 12 | APPBASE_LIB_DIR=$APPBASE_DIR/ionic1/base/www/lib/ionic 13 | 14 | ../clone/clone.sh --repository="starters" \ 15 | --depth="1" \ 16 | --directory="$APPBASE_DIR" \ 17 | --branch="master" 18 | } 19 | 20 | function run { 21 | cd ../.. 22 | 23 | VERSION=$(readJsonProp "package.json" "version") 24 | 25 | echo "-- Updating files..." 26 | 27 | rm -rf $APPBASE_LIB_DIR 28 | mkdir -p $APPBASE_LIB_DIR 29 | 30 | node_modules/.bin/gulp build --release --dist=$APPBASE_LIB_DIR 31 | cp -Rf scss $APPBASE_LIB_DIR 32 | 33 | echo "-- Updating bower dependency..." 34 | replaceJsonProp "$APPBASE_DIR/bower.json" "ionic" "ionic-team\/ionic-bower#$VERSION" 35 | 36 | cd $APPBASE_DIR 37 | 38 | git config --global user.email "hi@ionicframework.com" 39 | git config --global user.name "Ionitron" 40 | 41 | git add -A 42 | git commit -am "release: update ionic to v$VERSION" 43 | git push -q origin master 44 | 45 | echo "-- committed v$VERSION to starters repo successfully!" 46 | } 47 | 48 | source $(dirname $0)/../utils.inc 49 | -------------------------------------------------------------------------------- /scripts/bump/nightly.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ARG_DEFS=( 4 | "--build-number=(.*)" 5 | ) 6 | 7 | echo "##### " 8 | echo "##### bump/nightly.sh" 9 | echo "#####" 10 | 11 | function run { 12 | VERBOSE=true 13 | cd ../.. 14 | 15 | OLD_VERSION=$(readJsonProp "package.json" "version") 16 | NIGHTLY_VERSION="$OLD_VERSION-nightly-$BUILD_NUMBER" 17 | 18 | replaceJsonProp "package.json" "version" "$NIGHTLY_VERSION" 19 | 20 | echo "-- Nightly Version: $NIGHTLY_VERSION" 21 | } 22 | 23 | source $(dirname $0)/../utils.inc 24 | -------------------------------------------------------------------------------- /scripts/bump/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ARG_DEFS=( 4 | "--new-version=(.*)" 5 | ) 6 | 7 | echo "##### " 8 | echo "##### bump/release.sh" 9 | echo "#####" 10 | 11 | function run { 12 | cd ../.. 13 | 14 | CODENAME=$(head -n 1 config/CODENAMES) 15 | 16 | replaceJsonProp "package.json" "codename" "$CODENAME" 17 | replaceJsonProp "package.json" "version" "$NEW_VERSION" 18 | 19 | echo "-- New Version: $NEW_VERSION" 20 | echo "-- New Codename: $CODENAME" 21 | } 22 | 23 | source $(dirname $0)/../utils.inc 24 | -------------------------------------------------------------------------------- /scripts/cdn/publish.sh: -------------------------------------------------------------------------------- 1 | 2 | # Version name is "nightly" or a version number 3 | ARG_DEFS=( 4 | "--version-name=(.*)" 5 | "--old-version=(.*)" 6 | ) 7 | 8 | echo "##### " 9 | echo "##### cdn/publish.sh" 10 | echo "#####" 11 | 12 | function init { 13 | CDN_DIR=$HOME/ionic-code 14 | ../clone/clone.sh --repository="ionic-code" \ 15 | --depth="1" \ 16 | --directory="$CDN_DIR" \ 17 | --branch="gh-pages" 18 | } 19 | 20 | function run { 21 | cd ../.. 22 | 23 | VERSION_DIR=$CDN_DIR/$VERSION_NAME 24 | VERSION=$(readJsonProp "package.json" "version") 25 | 26 | rm -rf $VERSION_DIR 27 | mkdir -p $VERSION_DIR 28 | 29 | node_modules/.bin/gulp build --release --dist=$VERSION_DIR 30 | if [[ "$VERSION_NAME" == "nightly" ]]; then 31 | node_modules/.bin/gulp changelog --standalone \ 32 | --html=true \ 33 | --subtitle="(changes since $(git describe --tags --abbrev=0))" \ 34 | --dest="$VERSION_DIR/CHANGELOG.html" \ 35 | --from="$(git tag | grep $OLD_VERSION)" 36 | fi 37 | 38 | echo "-- Generating versions.json..." 39 | cd $CDN_DIR/builder 40 | python ./generate.py 41 | 42 | cd $CDN_DIR 43 | 44 | git config --global user.email "hi@ionicframework.com" 45 | git config --global user.name "Ionitron" 46 | 47 | git add -A 48 | git commit -am "release: $VERSION ($VERSION_NAME)" 49 | 50 | git push -q origin gh-pages 51 | 52 | echo "-- Published ionic-code v$VERSION successfully!" 53 | } 54 | 55 | source $(dirname $0)/../utils.inc 56 | -------------------------------------------------------------------------------- /scripts/circle/prepare.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ARG_DEFS=( 4 | "--index=(.*)" 5 | "--total=(.*)" 6 | ) 7 | 8 | function init { 9 | 10 | } 11 | 12 | function run { 13 | ../site/prepare.sh 14 | } 15 | 16 | source $(dirname $0)/../utils.inc 17 | -------------------------------------------------------------------------------- /scripts/clone/clone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ARG_DEFS=( 4 | "--repository=(.*)" 5 | "--directory=(.*)" 6 | "[--depth=(.*)]" 7 | "[--branch=(.*)]" 8 | ) 9 | 10 | function run { 11 | rm -rf $DIRECTORY 12 | mkdir -p $DIRECTORY 13 | 14 | echo "-- Cloning $REPOSITORY#$BRANCH to $DIRECTORY..." 15 | 16 | ARGS="--branch=${BRANCH:-master} --depth=3" 17 | if [[ "$DEPTH" != "" ]]; then 18 | ARGS="$ARGS --depth=$DEPTH" 19 | fi 20 | 21 | git config --global user.email "hi@ionicframework.com" 22 | git config --global user.name "Ionitron" 23 | 24 | git clone git@github.com:ionic-team/$REPOSITORY.git $DIRECTORY $ARGS 25 | cd $DIRECTORY 26 | git fetch origin --tags 27 | cd ../ 28 | } 29 | 30 | source $(dirname $0)/../utils.inc 31 | -------------------------------------------------------------------------------- /scripts/demo/publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ARG_DEFS=( 4 | "--version-name=(.*)" 5 | ) 6 | 7 | echo "##### " 8 | echo "##### demo/publish.sh" 9 | echo "#####" 10 | 11 | function init { 12 | DEMO_DIR=$HOME/ionic-demo 13 | 14 | ../clone/clone.sh --repository="ionic-demo" \ 15 | --depth="1" \ 16 | --directory="$DEMO_DIR" \ 17 | --branch="gh-pages" 18 | } 19 | 20 | function run { 21 | cd ../.. 22 | 23 | rm -rf $DEMO_DIR/$VERSION_NAME 24 | node_modules/.bin/gulp demos --release --demo-version=$VERSION_NAME --dist=$DEMO_DIR 25 | 26 | cd $DEMO_DIR 27 | 28 | CHANGES=$(git status --porcelain) 29 | 30 | # if no changes, don't commit 31 | if [[ "$CHANGES" == "" ]]; then 32 | echo "-- No changes detected in demos for $VERSION_NAME; demos not updated." 33 | else 34 | git add -A 35 | git commit -am "demos: update for $VERSION_NAME" 36 | git push -q origin gh-pages 37 | 38 | echo "-- Demos published $VERSION_NAME succesfully!" 39 | fi 40 | } 41 | 42 | source $(dirname $0)/../utils.inc 43 | -------------------------------------------------------------------------------- /scripts/pre-push-validate: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | gulp validate 4 | -------------------------------------------------------------------------------- /scripts/release/publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function init { 4 | RELEASE_DIR=$HOME/ionic-release 5 | ../clone/clone.sh --repository="ionic" \ 6 | --directory="$RELEASE_DIR" \ 7 | --branch="1.x" 8 | } 9 | 10 | echo "##### " 11 | echo "##### release/publish.sh" 12 | echo "#####" 13 | 14 | function run { 15 | cd ../.. 16 | 17 | node_modules/.bin/gulp build --release --dist="$RELEASE_DIR/release" 18 | #node_modules/.bin/gulp changelog --dest="$RELEASE_DIR/CHANGELOG.md" 19 | 20 | # Move modified files into the repo copy we're going to push 21 | cp package.json $RELEASE_DIR 22 | 23 | cd $RELEASE_DIR 24 | 25 | echo "$(tail -n +2 config/CODENAMES)" > config/CODENAMES 26 | 27 | VERSION=$(readJsonProp "package.json" "version") 28 | CODENAME=$(readJsonProp "package.json" "codename") 29 | 30 | replaceJsonProp "bower.json" "version" "$VERSION" 31 | replaceJsonProp "component.json" "version" "$VERSION" 32 | 33 | replaceJsonProp "bower.json" "codename" "$CODENAME" 34 | replaceJsonProp "component.json" "codename" "$CODENAME" 35 | 36 | git config --global user.email "hi@ionicframework.com" 37 | git config --global user.name "Ionitron" 38 | 39 | git add -A 40 | git commit -am "release: v$VERSION \"$CODENAME\"" 41 | git tag -f v$VERSION 42 | 43 | git push -q origin 1.x 44 | git push -q origin v$VERSION 45 | 46 | echo "-- Published ionic v$VERSION \"$CODENAME\" successfully!" 47 | } 48 | 49 | source $(dirname $0)/../utils.inc 50 | -------------------------------------------------------------------------------- /scripts/site/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ARG_DEFS=( 4 | ) 5 | 6 | echo "##### " 7 | echo "##### site/config.sh" 8 | echo "#####" 9 | 10 | function init { 11 | SITE_DIR=$HOME/ionic-site 12 | 13 | ../clone/clone.sh --repository="ionic-site" \ 14 | --directory="$SITE_DIR" \ 15 | --branch="master" 16 | } 17 | 18 | function run { 19 | cd ../.. 20 | 21 | VERSION=$(readJsonProp "package.json" "version") 22 | CODENAME=$(readJsonProp "package.json" "codename") 23 | DATE=$(date +"%Y-%m-%d") 24 | 25 | cd $SITE_DIR 26 | npm install 27 | 28 | $(replaceInFile "_config.yml" "latest_download:.*$" "latest_download: http:\/\/code.ionicframework.com\/$VERSION\/ionic-v$VERSION.zip") 29 | $(replaceInFile "_config.yml" "latest_version:.*$" "latest_version: $VERSION \"$CODENAME\"") 30 | $(replaceInFile "_config.yml" "latest_release_date:.*$" "latest_release_date: $DATE") 31 | 32 | git add -A 33 | git commit -am "release: $VERSION" 34 | source deploy.sh 35 | 36 | echo "-- Published ionic-site config v$VERSION successfully!" 37 | } 38 | 39 | 40 | source $(dirname $0)/../utils.inc 41 | -------------------------------------------------------------------------------- /scripts/site/docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ARG_DEFS=( 4 | "--version-name=(.*)" 5 | ) 6 | 7 | echo "##### " 8 | echo "##### site/docs.sh" 9 | echo "#####" 10 | 11 | function init { 12 | SITE_DIR=$HOME/ionic-site 13 | } 14 | 15 | # Example: ./scripts/site/publish.sh --action=docs --version-name=nightly 16 | function run { 17 | 18 | cd ../.. 19 | VERSION=$(readJsonProp "package.json" "version") 20 | 21 | node_modules/.bin/gulp docs --doc-version="$VERSION_NAME" --dist=$SITE_DIR 22 | node_modules/.bin/gulp docs-index --dist=$SITE_DIR 23 | 24 | cd $SITE_DIR 25 | #npm install 26 | 27 | CHANGES=$(git status --porcelain) 28 | 29 | # if no changes, don't commit 30 | if [[ "$CHANGES" == "" ]]; then 31 | echo "-- No changes detected in docs for $VERSION_NAME; docs not updated." 32 | else 33 | git add -A 34 | git commit -am "Automated build of native docs ionic-team/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1" 35 | 36 | # in case a different commit was pushed to ionic-site during doc/demo gen, 37 | # try to rebase around it before pushing 38 | git fetch 39 | git rebase 40 | 41 | git push origin master 42 | 43 | echo "-- Updated docs for $VERSION_NAME succesfully!" 44 | fi 45 | } 46 | 47 | source $(dirname $0)/../utils.inc 48 | -------------------------------------------------------------------------------- /scripts/site/prepare.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "##### " 4 | echo "##### prepare.sh" 5 | echo "#####" 6 | 7 | 8 | function init { 9 | cd .. 10 | SITE_PATH=../ionic-site 11 | cd .. 12 | export IONIC_DIR=$PWD 13 | SITE_DIR=$IONIC_DIR/$SITE_PATH 14 | } 15 | 16 | function run { 17 | 18 | if [ ! -d "$SITE_DIR" ]; then 19 | echo "checking out" 20 | cd ./scripts 21 | ./clone/clone.sh --repository="ionic-site" \ 22 | --directory="$SITE_DIR" \ 23 | --branch="master" 24 | ls -al $SITE_DIR 25 | else 26 | echo "using existing" 27 | cd $SITE_DIR 28 | git reset --hard 29 | git pull origin master 30 | fi 31 | } 32 | 33 | source $(dirname $0)/../utils.inc 34 | -------------------------------------------------------------------------------- /scripts/update-angular.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ARG_DEFS=( 4 | "--version=(.*)" 5 | ) 6 | function run { 7 | PROJECT_DIR=$SCRIPT_DIR/../ 8 | 9 | cd $SCRIPT_DIR/../config/lib/js/angular/ 10 | rm -rf *.js 11 | 12 | wget https://code.angularjs.org/$VERSION/angular{,-sanitize,-animate,-resource,-aria,-messages}{.min.js,.js} 13 | 14 | # # no min versions of mocks and scenario 15 | wget https://code.angularjs.org/$VERSION/angular{-scenario,-mocks}.js 16 | 17 | cd $PROJECT_DIR 18 | 19 | echo "Setting bower.json angular versions to $VERSION" 20 | 21 | replaceJsonProp "bower.json" "angular" "$VERSION" 22 | replaceJsonProp "bower.json" "angular-animate" "$VERSION" 23 | replaceJsonProp "bower.json" "angular-sanitize" "$VERSION" 24 | 25 | } 26 | 27 | source $(dirname $0)/utils.inc 28 | -------------------------------------------------------------------------------- /scss/_animations.scss: -------------------------------------------------------------------------------- 1 | 2 | // Slide up from the bottom, used for modals 3 | // ------------------------------- 4 | 5 | .slide-in-up { 6 | @include translate3d(0, 100%, 0); 7 | } 8 | .slide-in-up.ng-enter, 9 | .slide-in-up > .ng-enter { 10 | @include transition(all cubic-bezier(.1, .7, .1, 1) 400ms); 11 | } 12 | .slide-in-up.ng-enter-active, 13 | .slide-in-up > .ng-enter-active { 14 | @include translate3d(0, 0, 0); 15 | } 16 | 17 | .slide-in-up.ng-leave, 18 | .slide-in-up > .ng-leave { 19 | @include transition(all ease-in-out 250ms); 20 | } 21 | 22 | 23 | // Scale Out 24 | // Scale from hero (1 in this case) to zero 25 | // ------------------------------- 26 | 27 | @-webkit-keyframes scaleOut { 28 | from { -webkit-transform: scale(1); opacity: 1; } 29 | to { -webkit-transform: scale(0.8); opacity: 0; } 30 | } 31 | @keyframes scaleOut { 32 | from { transform: scale(1); opacity: 1; } 33 | to { transform: scale(0.8); opacity: 0; } 34 | } 35 | 36 | 37 | // Super Scale In 38 | // Scale from super (1.x) to duper (1 in this case) 39 | // ------------------------------- 40 | 41 | @-webkit-keyframes superScaleIn { 42 | from { -webkit-transform: scale(1.2); opacity: 0; } 43 | to { -webkit-transform: scale(1); opacity: 1 } 44 | } 45 | @keyframes superScaleIn { 46 | from { transform: scale(1.2); opacity: 0; } 47 | to { transform: scale(1); opacity: 1; } 48 | } 49 | -------------------------------------------------------------------------------- /scss/_backdrop.scss: -------------------------------------------------------------------------------- 1 | 2 | .backdrop { 3 | position: fixed; 4 | top: 0; 5 | left: 0; 6 | z-index: $z-index-backdrop; 7 | 8 | width: 100%; 9 | height: 100%; 10 | 11 | background-color: $loading-backdrop-bg-color; 12 | 13 | visibility: hidden; 14 | opacity: 0; 15 | 16 | &.visible { 17 | visibility: visible; 18 | } 19 | &.active { 20 | opacity: 1; 21 | } 22 | 23 | @include transition($loading-backdrop-fadein-duration opacity linear); 24 | } 25 | -------------------------------------------------------------------------------- /scss/_loading.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Loading 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .loading-container { 8 | position: absolute; 9 | left: 0; 10 | top: 0; 11 | right: 0; 12 | bottom: 0; 13 | 14 | z-index: $z-index-loading; 15 | 16 | @include display-flex(); 17 | @include justify-content(center); 18 | @include align-items(center); 19 | 20 | @include transition(0.2s opacity linear); 21 | visibility: hidden; 22 | opacity: 0; 23 | 24 | &:not(.visible) .icon, 25 | &:not(.visible) .spinner{ 26 | display: none; 27 | } 28 | &.visible { 29 | visibility: visible; 30 | } 31 | &.active { 32 | opacity: 1; 33 | } 34 | 35 | .loading { 36 | padding: $loading-padding; 37 | 38 | border-radius: $loading-border-radius; 39 | background-color: $loading-bg-color; 40 | 41 | color: $loading-text-color; 42 | 43 | text-align: center; 44 | text-overflow: ellipsis; 45 | font-size: $loading-font-size; 46 | 47 | h1, h2, h3, h4, h5, h6 { 48 | color: $loading-text-color; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /scss/_menu.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Menus 4 | * -------------------------------------------------- 5 | * Side panel structure 6 | */ 7 | 8 | .menu { 9 | position: absolute; 10 | top: 0; 11 | bottom: 0; 12 | z-index: $z-index-menu; 13 | overflow: hidden; 14 | 15 | min-height: 100%; 16 | max-height: 100%; 17 | width: $menu-width; 18 | 19 | background-color: $menu-bg; 20 | 21 | .scroll-content { 22 | z-index: $z-index-menu-scroll-content; 23 | } 24 | 25 | .bar-header { 26 | z-index: $z-index-menu-bar-header; 27 | } 28 | } 29 | 30 | .menu-content { 31 | @include transform(none); 32 | box-shadow: $menu-side-shadow; 33 | } 34 | 35 | .menu-open .menu-content .pane, 36 | .menu-open .menu-content .scroll-content { 37 | pointer-events: none; 38 | } 39 | .menu-open .menu-content .scroll-content .scroll { 40 | pointer-events: none; 41 | } 42 | .menu-open .menu-content .scroll-content:not(.overflow-scroll) { 43 | overflow: hidden; 44 | } 45 | 46 | .grade-b .menu-content, 47 | .grade-c .menu-content { 48 | @include box-sizing(content-box); 49 | right: -1px; 50 | left: -1px; 51 | border-right: 1px solid #ccc; 52 | border-left: 1px solid #ccc; 53 | box-shadow: none; 54 | } 55 | 56 | .menu-left { 57 | left: 0; 58 | } 59 | 60 | .menu-right { 61 | right: 0; 62 | } 63 | 64 | .aside-open.aside-resizing .menu-right { 65 | display: none; 66 | } 67 | 68 | .menu-animated { 69 | @include transition-transform($menu-animation-speed ease); 70 | } 71 | -------------------------------------------------------------------------------- /scss/_progress.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Progress 4 | * -------------------------------------------------- 5 | */ 6 | 7 | progress { 8 | display: block; 9 | margin: $progress-margin; 10 | width: $progress-width; 11 | } 12 | -------------------------------------------------------------------------------- /scss/_radio.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Radio Button Inputs 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .item-radio { 8 | padding: 0; 9 | 10 | &:hover { 11 | cursor: pointer; 12 | } 13 | } 14 | 15 | .item-radio .item-content { 16 | /* give some room to the right for the checkmark icon */ 17 | padding-right: $item-padding * 4; 18 | } 19 | 20 | .item-radio .radio-icon { 21 | /* checkmark icon will be hidden by default */ 22 | position: absolute; 23 | top: 0; 24 | right: 0; 25 | z-index: $z-index-item-radio; 26 | visibility: hidden; 27 | padding: $item-padding - 2; 28 | height: 100%; 29 | font-size: 24px; 30 | } 31 | 32 | .item-radio input { 33 | /* hide any radio button inputs elements (the ugly circles) */ 34 | position: absolute; 35 | left: -9999px; 36 | 37 | &:checked + .radio-content .item-content { 38 | /* style the item content when its checked */ 39 | background: #f7f7f7; 40 | } 41 | 42 | &:checked + .radio-content .radio-icon { 43 | /* show the checkmark icon when its checked */ 44 | visibility: visible; 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /scss/_slide-box.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Slide Box 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .slider { 8 | position: relative; 9 | visibility: hidden; 10 | // Make sure items don't scroll over ever 11 | overflow: hidden; 12 | } 13 | 14 | .slider-slides { 15 | position: relative; 16 | height: 100%; 17 | } 18 | 19 | .slider-slide { 20 | position: relative; 21 | display: block; 22 | float: left; 23 | width: 100%; 24 | height: 100%; 25 | vertical-align: top; 26 | } 27 | 28 | .slider-slide-image { 29 | > img { 30 | width: 100%; 31 | } 32 | } 33 | 34 | .slider-pager { 35 | position: absolute; 36 | bottom: 20px; 37 | z-index: $z-index-slider-pager; 38 | width: 100%; 39 | height: 15px; 40 | text-align: center; 41 | 42 | .slider-pager-page { 43 | display: inline-block; 44 | margin: 0px 3px; 45 | width: 15px; 46 | color: #000; 47 | text-decoration: none; 48 | 49 | opacity: 0.3; 50 | 51 | &.active { 52 | @include transition(opacity 0.4s ease-in); 53 | opacity: 1; 54 | } 55 | } 56 | } 57 | 58 | //Disable animate service animations 59 | .slider-slide, 60 | .slider-pager-page { 61 | &.ng-enter, 62 | &.ng-leave, 63 | &.ng-animate { 64 | -webkit-transition: none !important; 65 | transition: none !important; 66 | } 67 | &.ng-animate { 68 | -webkit-animation: none 0s; 69 | animation: none 0s; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /scss/ionic.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | @import 4 | // Ionicons 5 | "ionicons/ionicons.scss", 6 | 7 | // Variables 8 | "mixins", 9 | "variables", 10 | 11 | // Base 12 | "reset", 13 | "scaffolding", 14 | "type", 15 | 16 | // Components 17 | "action-sheet", 18 | "backdrop", 19 | "bar", 20 | "tabs", 21 | "menu", 22 | "modal", 23 | "popover", 24 | "popup", 25 | "loading", 26 | "items", 27 | "list", 28 | "badge", 29 | "slide-box", 30 | "slides", 31 | "refresher", 32 | "spinner", 33 | 34 | // Forms 35 | "form", 36 | "checkbox", 37 | "toggle", 38 | "radio", 39 | "range", 40 | "select", 41 | "progress", 42 | 43 | // Buttons 44 | "button", 45 | "button-bar", 46 | 47 | // Util 48 | "grid", 49 | "util", 50 | "platform", 51 | 52 | // Animations 53 | "animations", 54 | "transitions"; 55 | -------------------------------------------------------------------------------- /scss/ionicons/_ionicons-font.scss: -------------------------------------------------------------------------------- 1 | // Ionicons Font Path 2 | // -------------------------- 3 | 4 | @font-face { 5 | font-family: $ionicons-font-family; 6 | src:url("#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}"); 7 | src:url("#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}#iefix") format("embedded-opentype"), 8 | url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype"), 9 | url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"), 10 | url("#{$ionicons-font-path}/ionicons.woff") format("woff"), /* for WP8 */ 11 | url("#{$ionicons-font-path}/ionicons.svg?v=#{$ionicons-version}#Ionicons") format("svg"); 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | 16 | .ion { 17 | display: inline-block; 18 | font-family: $ionicons-font-family; 19 | speak: none; 20 | font-style: normal; 21 | font-weight: normal; 22 | font-variant: normal; 23 | text-transform: none; 24 | text-rendering: auto; 25 | line-height: 1; 26 | -webkit-font-smoothing: antialiased; 27 | -moz-osx-font-smoothing: grayscale; 28 | } 29 | -------------------------------------------------------------------------------- /scss/ionicons/ionicons.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "ionicons-variables"; 3 | /*! 4 | Ionicons, v2.0.1 5 | Created by Ben Sperry for the Ionic Framework, http://ionicons.com/ 6 | https://twitter.com/benjsperry https://twitter.com/ionicframework 7 | MIT License: https://github.com/ionic-team/ionicons 8 | 9 | Android-style icons originally built by Google’s 10 | Material Design Icons: https://github.com/google/material-design-icons 11 | used under CC BY http://creativecommons.org/licenses/by/4.0/ 12 | Modified icons to fit ionicon’s grid from original. 13 | */ 14 | 15 | @import "ionicons-font"; 16 | @import "ionicons-icons"; 17 | -------------------------------------------------------------------------------- /test/css/buttons-link-block.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Buttons 7 | 8 | 9 | 14 | 15 | 16 | 17 |
    18 |

    Buttons: <link> block w/ padding

    19 |
    20 | 21 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /test/css/buttons-link-icon.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Buttons 7 | 8 | 9 | 14 | 15 | 16 | 17 |
    18 |

    Buttons: <link> block w/ icons

    19 |
    20 | 21 |
    22 | 25 |
    26 | 27 |
    28 | 29 |
    30 | Learn More 31 |
    32 | Back 33 |
    34 | 35 |
    36 | 37 |
    38 | Reorder 39 |
    40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /test/css/buttons-misc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Buttons 7 | 8 | 9 | 14 | 15 | 16 | 17 |
    18 |

    Buttons: Misc.

    19 |
    20 | 21 |
    22 | 23 |

    24 | Disabled By ClassName 25 | Disabled By Attribute 26 |

    27 | 28 |
    29 | 30 |

    31 | 32 | 33 | link element 34 |

    35 | 36 |
    37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /test/css/buttons.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Buttons 7 | 8 | 9 | 14 | 15 | 16 | 17 |
    18 |

    Buttons: borderless

    19 |
    20 | 21 |
    22 | 23 | 24 | 25 | 26 | 27 |
    28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/css/cards-header-footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Cards 7 | 8 | 9 | 14 | 15 | 16 | 17 |
    18 |

    Cards: Header/Footer

    19 |
    20 | 21 |
    22 | 23 |
    24 |
    25 | I'm a Header in a Card! 26 |
    27 |
    28 | This is a basic Card with some text. 29 |
    30 |
    31 | I'm a Footer in a Card! 32 |
    33 |
    34 | 35 |
    36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /test/css/cards-item-icon.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Cards 7 | 8 | 9 | 14 | 15 | 16 | 17 |
    18 |

    Cards: Item Icon

    19 |
    20 | 21 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /test/css/lists-colors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Lists 7 | 8 | 9 | 14 | 15 | 16 | 17 |
    18 |

    Lists: Colors

    19 |
    20 | 21 |
    22 | 23 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /test/css/progress.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Progress 7 | 8 | 9 | 14 | 15 | 16 | 17 |
    18 |

    Progress

    19 |
    20 | 21 |
    22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
    30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /test/css/scroll.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Scroll 7 | 8 | 9 | 18 | 19 | 20 |
    21 |
    22 |

    Scroll Me

    23 |
    24 |
    25 |
    26 | 27 |
    28 |
      29 |
    30 |
    31 |
    32 | 33 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /test/css/search-ios.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Search 7 | 8 | 9 | 15 | 16 | 17 | 18 |
    19 | 20 |
    21 | 25 | 28 |
    29 | 30 |
    31 | 35 | 38 |
    39 | 40 |
    41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /test/css/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Search 7 | 8 | 9 | 10 | 11 | 12 |
    13 | 14 |
    15 | 19 | 22 |
    23 | 24 |
    25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/css/status-bar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Status Bar 7 | 8 | 9 | 24 | 25 | 26 | 27 |
    Fake iOS7 Status Bar
    28 | 29 |
    30 | Back 31 |

    Status Bar

    32 | Home 33 |
    34 | 35 | 36 | -------------------------------------------------------------------------------- /test/css/tabs-default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Tabs: Top Icons 7 | 8 | 9 | 10 | 11 | 12 |
    13 |

    Tab Bars

    14 |
    15 | 16 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /test/css/tabs-icons-left.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Tabs: Left Icons 7 | 8 | 9 | 10 | 11 | 12 |
    13 |

    Tabs: Left Icons

    14 |
    15 | 16 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /test/css/tabs-icons-right.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Tabs: Right Icons 7 | 8 | 9 | 10 | 11 | 12 |
    13 |

    Tabs: Right Icons

    14 |
    15 | 16 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /test/css/tabs-no-icons.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Tabs: No Icons 7 | 8 | 9 | 10 | 11 | 12 |
    13 |

    Tabs: No Icons

    14 |
    15 | 16 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /test/css/tabs-only-icons.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Tabs: Only Icons 7 | 8 | 9 | 10 | 11 | 12 |
    13 |

    Tabs: Only Icons

    14 |
    15 | 16 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /test/css/type.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Type 7 | 8 | 9 | 14 | 15 | 16 | 17 |
    18 |

    Type

    19 |
    20 | 21 |
    22 |

    I'm an H1 Element: gjpqy

    23 |

    I'm an H2 Element: gjpqy

    24 |

    I'm an H3 Element: gjpqy

    25 |

    I'm an H4 Element: gjpqy

    26 |
    I'm an H5 Element: gjpqy
    27 |
    I'm an H6 Element: gjpqy
    28 |

    I'm a paragraph Element!

    29 |

    As am I'm a paragraph Element too.

    30 |
    31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /test/html/anchorScroll.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
    16 | 17 |
    18 | 19 |
    20 |

    Click the Clock to Get Stuck

    21 |
    22 | 23 | 24 | 25 | 26 | 29 | Item {{ item.id }} 30 | 31 | 32 | 33 | 34 |
    35 | 36 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /test/html/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/test/html/app_icon.png -------------------------------------------------------------------------------- /test/html/cards.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Cards 7 | 8 | 9 | 14 | 15 | 16 | 17 | 18 |

    Cards: Text

    19 |
    20 | 21 | 22 |

    Hello

    23 |
    24 |
    25 |
    26 | .card.item-text-wrap .item.item-complex .item-content 27 | This is a basic Card with some wrapping text. 28 | This is a basic Card with some wrapping text. 29 | This is a basic Card with some wrapping text. 30 |
    31 |
    32 |
    33 | 34 |
    35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /test/html/cat1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/test/html/cat1.png -------------------------------------------------------------------------------- /test/html/cat2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/test/html/cat2.png -------------------------------------------------------------------------------- /test/html/cat3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/test/html/cat3.png -------------------------------------------------------------------------------- /test/html/cat4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/test/html/cat4.png -------------------------------------------------------------------------------- /test/html/collection-repeat/basic-grid.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Sample UL 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |

    Basic Grid: Dynamic Dimensions

    17 |
    18 | 19 | 20 | 24 |

    {{item.text}}

    25 |
    26 |
    27 |
    28 | 42 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /test/html/collection-repeat/horizontal-image-grid.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Sample UL 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/html/content_simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Content 6 | 7 | 8 | 9 | 10 | 11 | 12 | 19 | 20 | 21 | 22 | 23 | 24 |
    25 | 26 |
    27 |

    Title!

    28 |
    29 | 30 |
    31 |
    32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
    43 | 44 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /test/html/exoplanet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/test/html/exoplanet.jpg -------------------------------------------------------------------------------- /test/html/input-radio-basic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Radio Buttons 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

    Radio Buttons

    16 |
    17 | 18 | 19 | {{ formData }} 20 |
    21 | Red 22 | Blue 23 | Yellow 24 |
    25 |
    26 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /test/html/input-radio.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Radio Buttons 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

    Radio Buttons

    16 |
    17 | 18 | 19 | {{ $parent.formData }} 20 |
    21 | 22 | Apply Disabled 23 | Enable 24 | 25 | gets disabled Red 26 | gets disabled Blue 27 |
    28 |
    29 | 35 | 36 | -------------------------------------------------------------------------------- /test/html/input-range.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Radio Buttons 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

    Radio Buttons

    16 |
    17 | 18 | 19 |
    20 |
    21 | 22 | 23 | 24 |
    25 |
    26 |
    27 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/html/jan/contact.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 |
    5 | 9 | 13 |
    14 |
    15 | 18 |
    19 |
    20 |
    21 | -------------------------------------------------------------------------------- /test/html/jan/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Side Menus 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /test/html/jan/jan.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Side Menus 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /test/html/jan/menu.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Menu

    15 |
    16 | 17 | 18 | 19 | Kontakt 20 | 21 | 22 | Info 23 | 24 | 25 | 26 |
    27 |
    28 | -------------------------------------------------------------------------------- /test/html/keyboard.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Text Inputs 6 | 7 | 8 | 9 | 10 | 11 | 12 |
    13 |

    Text Inputs

    14 |
    15 | 16 | 17 | 18 | 19 |
    20 |
    21 | 22 | Username 23 | 24 | 25 | 26 | Password 27 | 28 | 29 |
    30 |
    31 | 32 |
    33 |
    34 | 35 |
    36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /test/html/loading.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Loading 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /test/html/nestedScroll.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
    16 | 17 | 18 | 19 |

    outer

    20 | 21 |

    inner

    22 |

    {{i}}

    23 |
    24 |

    {{i}}

    25 |
    26 |
    27 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /test/html/popupRace.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ionic Pull to Refresh 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 35 | 36 | -------------------------------------------------------------------------------- /test/html/pull-to-refresh.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ionic Pull to Refresh 7 | 8 | 9 | 10 | 11 | 12 | 13 |

    Pull To Refresh

    14 |
    15 | 16 | 17 | 18 | 19 | {{item}} 20 | 21 | 22 | 23 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /test/html/rememberScroll.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | List 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
    16 | 17 | {{i}} 18 | 19 |
    20 |
    21 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /test/html/slidesProducts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Slide Box 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Hello 17 | 18 | 19 |

    Just cat things

    20 | 21 | 22 | 23 | 24 | 25 |
    26 |
    27 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /test/html/tabs-repeat.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Inline Tabs 7 | 8 | 9 | 10 | 11 | 27 | 28 | 29 | 30 |

    Hello

    31 |
    32 | 33 | {{p.id}} 34 |

    ...

    35 |

    ...

    36 |

    ...

    37 |

    ...

    38 |

    ...

    39 |
    40 |
    41 |
    42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /test/html/tabs-templates/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    Create hybrid mobile apps with the web technologies you love.

    4 |

    Free and open source, Ionic offers a library of mobile-optimized HTML, CSS and JS components for building highly interactive apps.

    5 |

    Built with Sass and optimized for AngularJS.

    6 |

    7 | Tabs Nav Stack 8 |

    9 |
    10 |
    -------------------------------------------------------------------------------- /test/html/tabs-templates/facts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    Banging your head against a wall uses 150 calories an hour.

    4 |

    Dogs have four toes on their hind feet, and five on their front feet.

    5 |

    The ant can lift 50 times its own weight, can pull 30 times its own weight and always falls over on its right side when intoxicated.

    6 |

    A cockroach will live nine days without it's head, before it starves to death.

    7 |

    Polar bears are left handed.

    8 |

    9 | Home 10 | More Facts 11 |

    12 |
    13 |
    -------------------------------------------------------------------------------- /test/html/tabs-templates/facts2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    111,111,111 x 111,111,111 = 12,345,678,987,654,321

    4 |

    1 in every 4 Americans has appeared on T.V.

    5 |

    11% of the world is left-handed.

    6 |

    1 in 8 Americans has worked at a McDonalds restaurant.

    7 |

    $283,200 is the absolute highest amount of money you can win on Jeopardy.

    8 |

    101 Dalmatians, Peter Pan, Lady and the Tramp, and Mulan are the only Disney cartoons where both parents are present and don't die throughout the movie.

    9 |

    10 | Home 11 | Scientific Facts 12 |

    13 |
    14 |
    -------------------------------------------------------------------------------- /test/html/tabs-templates/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    Example of Ionic tabs. Navigate to each tab, and 4 | navigate to child views of each tab and notice how 5 | each tab has its own navigation history.

    6 |

    7 | Scientific Facts 8 |

    9 |
    10 |
    -------------------------------------------------------------------------------- /test/html/tabs-templates/nav-stack.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    4 |
    5 |
    -------------------------------------------------------------------------------- /test/html/tabs-templates/tabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/html/tree_bark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionic-team/ionic-v1/9a30f0bf063c97e03aad7a3b1daf76164ac86c5f/test/html/tree_bark.png -------------------------------------------------------------------------------- /test/unit/angular/directive/backdrop.unit.js: -------------------------------------------------------------------------------- 1 | describe('$ionicBackdrop service', function() { 2 | beforeEach(module('ionic', function($provide) { 3 | $provide.value('$$rAF', function(cb) { cb(); }); 4 | })); 5 | 6 | it('should add active on retain', inject(function($ionicBackdrop) { 7 | var el = $ionicBackdrop._element; 8 | expect(el.hasClass('active')).toBe(false); 9 | $ionicBackdrop.retain(); 10 | expect(el.hasClass('active')).toBe(true); 11 | })); 12 | 13 | it('should add and remove active on retain and release', inject(function($ionicBackdrop) { 14 | var el = $ionicBackdrop._element; 15 | expect(el.hasClass('active')).toBe(false); 16 | $ionicBackdrop.retain(); 17 | expect(el.hasClass('active')).toBe(true); 18 | $ionicBackdrop.release(); 19 | expect(el.hasClass('active')).toBe(false); 20 | })); 21 | 22 | it('should require equal releases and retains', inject(function($ionicBackdrop) { 23 | var el = $ionicBackdrop._element; 24 | expect(el.hasClass('active')).toBe(false); 25 | $ionicBackdrop.retain(); 26 | expect(el.hasClass('active')).toBe(true); 27 | $ionicBackdrop.retain(); 28 | expect(el.hasClass('active')).toBe(true); 29 | $ionicBackdrop.retain(); 30 | expect(el.hasClass('active')).toBe(true); 31 | $ionicBackdrop.release(); 32 | expect(el.hasClass('active')).toBe(true); 33 | $ionicBackdrop.release(); 34 | expect(el.hasClass('active')).toBe(true); 35 | $ionicBackdrop.release(); 36 | expect(el.hasClass('active')).toBe(false); 37 | })); 38 | }); 39 | -------------------------------------------------------------------------------- /test/unit/angular/directive/gesture.unit.js: -------------------------------------------------------------------------------- 1 | describe('gesture directive', function() { 2 | beforeEach(module('ionic')); 3 | 4 | GESTURE_DIRECTIVES 5 | .map(function(directiveName) { 6 | return { 7 | gestureName: directiveName.substr(2).toLowerCase(), 8 | directiveName: directiveName, 9 | htmlName: directiveName.replace(/[A-Z]/g, function(match, i) { 10 | return '-' + match.toLowerCase(); 11 | }) 12 | }; 13 | }) 14 | .forEach(function(directive){ 15 | it('should compile', inject(function($compile, $rootScope, $ionicGesture) { 16 | var fakeGesture = {}; 17 | spyOn($ionicGesture, 'on').andCallFake(function(eventType, listener, el) { 18 | callback = listener; 19 | return fakeGesture; 20 | }); 21 | spyOn($ionicGesture, 'off'); 22 | var el = $compile('
    ')($rootScope.$new()); 23 | $rootScope.$apply(); 24 | 25 | el.scope().foo = jasmine.createSpy('foo'); 26 | 27 | expect($ionicGesture.on.mostRecentCall.args[0]).toBe(directive.gestureName); 28 | var event = {}; 29 | callback(event); 30 | expect(el.scope().foo).toHaveBeenCalledWith(1, event); 31 | el.scope().$destroy(); 32 | expect($ionicGesture.off).toHaveBeenCalledWith(fakeGesture, directive.gestureName, callback); 33 | })); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /test/unit/angular/directive/radio.unit.js: -------------------------------------------------------------------------------- 1 | describe('ionRadio directive', function() { 2 | var compile, element, scope; 3 | 4 | beforeEach(module('ionic')); 5 | 6 | beforeEach(inject(function($compile, $rootScope, $timeout, $window) { 7 | compile = $compile; 8 | scope = $rootScope; 9 | timeout = $timeout; 10 | window = $window; 11 | ionic.Platform.setPlatform('Android'); 12 | spyOn(ionic.Platform, 'ready').andCallFake(function(cb) { 13 | cb(); 14 | }); 15 | })); 16 | it('passes ngDisabled attribute', function() { 17 | var element = compile('')(scope); 18 | el = element[0].querySelector('input'); 19 | scope.$apply(); 20 | expect(el.disabled) 21 | .toBe(true); 22 | }); 23 | }); -------------------------------------------------------------------------------- /test/unit/angular/directive/spinner.js: -------------------------------------------------------------------------------- 1 | describe('Ionic Spinner', function() { 2 | var el, scope, compile; 3 | 4 | beforeEach(module('ionic')); 5 | 6 | beforeEach(inject(function($compile, $rootScope) { 7 | compile = $compile; 8 | scope = $rootScope; 9 | })); 10 | 11 | it('should compile and output an svg', function() { 12 | el = compile('')(scope); 13 | var spinner = el.find('svg'); 14 | expect(spinner.length).toEqual(1); 15 | }); 16 | 17 | it('should add config setting class', inject(function($ionicConfig){ 18 | $ionicConfig.spinner.icon('android'); 19 | el = compile('')(scope); 20 | expect(el.is('.spinner-android')).toEqual(true); 21 | })); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /test/unit/angular/service/decorators/location.unit.js: -------------------------------------------------------------------------------- 1 | describe('$location decorator', function() { 2 | 3 | beforeEach(module('ionic')); 4 | 5 | describe('.hash()', function() { 6 | 7 | it('should find .scroll-content and set scrollTop=0', inject(function($location, $timeout, $rootScope) { 8 | var scroll = { scrollTop: 5 }; 9 | spyOn(document, 'querySelector').andCallFake(function() { 10 | return scroll; 11 | }); 12 | 13 | $location.hash('123'); 14 | $timeout.flush(); 15 | expect(scroll.scrollTop).toBe(0); 16 | 17 | scroll.scrollTop = 33; 18 | $location.hash('456'); 19 | $timeout.flush(); 20 | expect(scroll.scrollTop).toBe(0); 21 | })); 22 | 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /test/unit/angular/service/gesture.unit.js: -------------------------------------------------------------------------------- 1 | describe('Ionic Gesture Service', function() { 2 | var gesture; 3 | 4 | beforeEach(module('ionic')); 5 | 6 | beforeEach(inject(function($ionicGesture) { 7 | gesture = $ionicGesture; 8 | })); 9 | 10 | it('Should bind', function() { 11 | var el = document.createElement('div'); 12 | 13 | var handlers = { 14 | dragHandle: function(e) { 15 | } 16 | }; 17 | spyOn(handlers, 'dragHandle'); 18 | gesture.on('drag', handlers.dragHandle, angular.element(el)); 19 | 20 | var event = new ionic.CustomEvent('drag', { target: el }); 21 | el.dispatchEvent(event); 22 | 23 | expect(handlers.dragHandle).toHaveBeenCalled(); 24 | }); 25 | it('Should unbind', function() { 26 | var el = document.createElement('div'); 27 | 28 | var handlers = { 29 | dragHandle: function(e) { 30 | } 31 | }; 32 | spyOn(handlers, 'dragHandle'); 33 | 34 | var g = gesture.on('drag', handlers.dragHandle, angular.element(el)); 35 | 36 | var event = new ionic.CustomEvent('drag', { target: el }); 37 | el.dispatchEvent(event); 38 | 39 | expect(handlers.dragHandle).toHaveBeenCalled(); 40 | 41 | gesture.off(g, 'drag', handlers.dragHandle); 42 | 43 | event = new ionic.CustomEvent('drag', { target: el }); 44 | el.dispatchEvent(event); 45 | 46 | expect(handlers.dragHandle).toHaveBeenCalled(); 47 | }); 48 | }); 49 | -------------------------------------------------------------------------------- /test/unit/events.unit.js: -------------------------------------------------------------------------------- 1 | describe('Ionic Events', function() { 2 | it('Should block all click events', function() { 3 | var a = document.createElement('a'); 4 | 5 | ionic.trigger('click', { 6 | target: a 7 | }); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /test/unit/utils/dom.unit.js: -------------------------------------------------------------------------------- 1 | 2 | describe('js/utils/dom', function() { 3 | 4 | describe('getPositionInParent', function() { 5 | it('should return el.{offsetLeft,offsetTop}', function() { 6 | var el = { offsetLeft: 3, offsetTop: 4 }; 7 | expect(ionic.DomUtil.getPositionInParent(el)).toEqual({ left: 3, top: 4 }); 8 | }); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /test/unit/views/modalView.unit.js: -------------------------------------------------------------------------------- 1 | describe('Modal View', function() { 2 | var h; 3 | beforeEach(function() { 4 | m = document.createElement('modal'); 5 | m.innerHTML = 'Click

    What what what

    '; 6 | }); 7 | 8 | it('Should init', function() { 9 | var mod = new ionic.views.Modal({ 10 | el: m 11 | }); 12 | expect(mod.focusFirstInput).toBe(false); 13 | expect(mod.unfocusOnHide).toBe(true); 14 | expect(mod.focusFirstDelay).toBe(600); 15 | expect(mod.backdropClickToClose).toBe(true); 16 | expect(mod.hardwareBackButtonClose).toBe(true); 17 | 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /test/unit/views/sideMenu.unit.js: -------------------------------------------------------------------------------- 1 | describe('SideMenu', function() { 2 | var menu; 3 | 4 | beforeEach(function() { 5 | var d = document.createElement('div'); 6 | menu = new ionic.views.SideMenu({ 7 | el: d, 8 | width: 270 9 | }); 10 | }); 11 | 12 | it('Should init', function() { 13 | expect(menu.width).toEqual(270); 14 | expect(menu.isEnabled).toEqual(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /test/unit/views/toggleView.unit.js: -------------------------------------------------------------------------------- 1 | describe('Toggle view', function() { 2 | var element, toggle; 3 | 4 | beforeEach(function() { 5 | element = $('
    ' + 6 | '
    Cats
    ' + 7 | '' + 13 | '
    '); 14 | 15 | el = element[0].getElementsByTagName('label')[0]; 16 | checkbox = el.children[0]; 17 | track = el.children[1]; 18 | handle = track.children[0]; 19 | toggle = new ionic.views.Toggle({ 20 | el: el, 21 | checkbox: checkbox, 22 | track: track, 23 | handle: handle 24 | }); 25 | }); 26 | 27 | it('Should init', function() { 28 | expect(toggle.el).not.toBe(undefined); 29 | }); 30 | }); 31 | --------------------------------------------------------------------------------