Commit Graph

46 Commits

Author SHA1 Message Date
Andy Joslin
dbe4e3901d feat(ionic): remove all delegates
BREAKING CHANGE: $ionicScrollDelegate, $ionicSlideBoxDelegate, and
$ionicSideMenuDelegate have been removed.

  - $ionicScrollDelegate has been changed to $ionicScrollController.
    Documentation:
    [ionContent](
    http://ajoslin.github.io/docs/nightly/api/directive/ionContent),
    [ionScroll](
    http://ajoslin.github.io/docs/nightly/api/directive/ionScroll)

    Change your code from this:

    ```html
    <ion-content ng-controller="MyCtrl">
      <button ng-click="scrollBottom()">Scroll to bottom!</button>
    </ion-content>
    ```
    ```js
    function MyCtrl($scope, $ionicScrollDelegate) {
      $scope.scrollBottom = function() {
        $ionicScrollDelegate.scrollBottom();
      };
    }
    ```

    To this:

    ```html
    <!-- optional attr controller-bind, see docs -->
    <ion-content ng-controller="MyCtrl">
      <button ng-click="scrollBottom()">Scroll to bottom!</button>
    </ion-content>
    ```
    ```js
    function MyCtrl($scope) {
      $scope.scrollBottom = function() {
        $scope.$ionicScrollController.scrollBottom();
      };
    }
    ```

  - $ionicSideMenuDelegate has been changed to
    $ionicSideMenusController. Documentation:
    [ionSideMenus](http://ajoslin.github.io/docs/nightly/api/directive/ionSideMenus)

    Change your code from this:

    ```html
    <ion-side-menus>
      <ion-side-menu side="left">Side Menu Left</ion-side-menu>
      <ion-pane ion-side-menu-content ng-controller="MyCtrl">
        <button ng-click="toggleLeftMenu()">
          Toggle Left Menu!
        </button>
      </ion-pane>
    </ion-side-menus>
    ```
    ```js
    function MyCtrl($scope, $ionicSideMenuDelegate) {
      $scope.toggleLeftMenu = function() {
        $ionicSideMenuDelegate.toggleLeft();
      };
    }
    ```

    To this:

    ```html
    <!-- optional attr controller-bind, see documentation -->
    <ion-side-menus>
      <ion-side-menu side="left">Side Menu Left</ion-side-menu>
      <ion-pane ion-side-menu-content ng-controller="MyCtrl">
        <button ng-click="toggleLeftMenu()">
          Toggle Left Menu!
        </button>
      </ion-pane>
    </ion-side-menus>
    ```
    ```js
    function MyCtrl($scope) {
      $scope.toggleLeftMenu = function() {
        $scope.$ionicSideMenuController.toggleLeft();
      };
    }
    ```

  - $ionicSlideBoxDelegate has been removed and upgraded to
    $ionicSlideBoxController. It had only one method that
    was unneeded.  [Documentation](
    http://ajoslin.github.io/docs/nightly/api/directive/ionSlideBox)
2014-03-19 11:51:07 -06:00
Max Lynch
306dd467fe Merge branch 'master' of https://github.com/driftyco/ionic
Conflicts:
	js/ext/angular/test/content.html
2014-03-18 17:53:22 -05:00
Max Lynch
a21c84a8a9 Fun test 2014-03-18 17:52:51 -05:00
Andy Joslin
cd5131c107 tests(): move has-* to classes for ion-content elements 2014-03-18 15:36:13 -06:00
Max Lynch
9db69cfda4 Fix content demo 2014-03-18 15:57:13 -05:00
Andy Joslin
a40baff555 tests: update for new directive syntaxes 2014-03-18 08:13:05 -06:00
Andy Joslin
4715a118e0 refactor($ionicScrollDelegate): make it a factory from current scope
BREAKING CHANGE: $ionicScrollDelegate no longer works globally; you must
create a new instance of each time you use it.  The actual methods on
each instance of $ionicScrollDelegate are the same, however.

Change your code from this:

```js
function MyController($scope, $ionicScrollDelegate) {
  $scope.scrollTop = function() {
    $ionicScrollDelegate.scrollTop();
  };
}
```

To this:

```js
function MyController($scope, $ionicScrollDelegate) {
  var delegate = $ionicScrollDelegate($scope);
  $scope.scrollTop = function() {
    delegate.scrollTop();
  };
}
```
2014-03-17 07:21:20 -06:00
Adam Bradley
52671c18f9 fix(transform): Polyfill style.transform to work w/ non-webkit 2014-02-20 15:40:12 -06:00
Andy Joslin
2c39a21498 feat(ionic): prefix all directives with ion-
BREAKING CHANGE: All directives are now prefixed with `ion-`.

For any directive you use, add the ionic prefix.

For example, change this HTML:

```html
<tabs>
  <tab title="home" href="/tab/home">
    <content>Hello!</content>
  </tab>
</tabs>
```

To this HTML:

```
<ion-tabs>
  <ion-tab title="home" href="/tab/home">
    <ion-content>Hello!</ion-content>
  </ion-tab>
</ion-tabs>
```
2014-02-18 16:13:00 -05:00
Andy Joslin
5d2f24cf59 chore(): make test files use ionic.bundle.js 2014-02-10 13:49:02 -05:00
Adam Bradley
a8729fb17a Remove angular-touch.js and angular-route.js references 2014-01-24 21:33:28 -06:00
Max Lynch
790c97a428 Fixed #461 - PTR Android 2014-01-23 09:11:40 -06:00
Max Lynch
050870e5f4 Fixed #458 2014-01-22 23:12:50 -06:00
Max Lynch
27311d5d18 Added support for offset start scroll view 2014-01-13 19:29:32 -06:00
Max Lynch
db6ce5044f Added padding to content example 2014-01-13 17:11:44 -06:00
Max Lynch
d90ae2c9af Fixed #279 - transclusion issue with content 2014-01-13 10:17:28 -06:00
Adam Bradley
cfdefd452e update w/ ui-router 2014-01-07 19:50:39 -06:00
Max Lynch
2285c24362 Fixed #264 and #286 - snapping scroll 2013-12-12 18:49:49 -06:00
Max Lynch
edeac3321a Bad console.log, Bad! 2013-12-12 14:38:19 -06:00
Max Lynch
37c6ac81ac Fixed #317 2013-12-12 14:26:12 -06:00
Max Lynch
098020e511 Fixed #315 - scroll size waiting 2013-12-11 17:07:10 -06:00
Max Lynch
3a801ac955 Fixed #311 - scrollbars for scroll view 2013-12-11 16:15:55 -06:00
Max Lynch
0d881821bd Scroll complete callback 2013-12-09 16:05:59 -06:00
Max Lynch
2c71e760f7 Fixed #291 - custom refresher content 2013-12-07 20:05:18 -06:00
Max Lynch
7bd2e5263d Expose an onScroll event 2013-12-05 19:30:18 -06:00
Max Lynch
4155da065c Scroll improvements 2013-12-03 17:56:35 -06:00
Max Lynch
e336e4dc54 More removal of flexbox vert 2013-12-03 15:16:01 -06:00
Max Lynch
088779b6e9 Removed more fixed stuff for tabs, etc. 2013-11-28 12:12:00 -06:00
Max Lynch
194bc67b75 Removed unnecessary abs positioning and subheader top 2013-11-28 11:59:01 -06:00
Max Lynch
3ea744c95a Moving to flexbox for vertical components 2013-11-28 11:30:11 -06:00
Max Lynch
6514bc24a4 More scroll prog 2013-11-27 17:25:01 -06:00
Max Lynch
860ce78f2f Slight content test tweak 2013-11-26 09:12:50 -06:00
Max Lynch
3c23369412 Fixed #179 2013-11-25 21:54:24 -06:00
Max Lynch
4646f5d459 Fixed #201 #215 #210 2013-11-25 14:26:34 -06:00
Max Lynch
531044e9b0 Fixed #151 2013-11-17 14:53:24 -06:00
Max Lynch
7b317fb7ff Fixed #134 - secondary header content 2013-11-15 21:16:22 -06:00
Max Lynch
22d10a155e LOTS OF SHIT WOW 2013-11-13 22:49:57 -06:00
Max Lynch
d082c0c148 Fixed #56 - pull to drag 2013-11-08 16:58:14 -06:00
Max Lynch
7c4a37e56a On refresh opening 2013-11-08 15:44:22 -06:00
Max Lynch
8a7db90aaf Refresh and refresh callback on content directive 2013-11-08 15:32:50 -06:00
Max Lynch
7725a5e7f2 Moved ionicons back in, simplified life 2013-11-08 14:09:20 -06:00
Max Lynch
6070db9f42 Flexbox for refresher content, vertically centered! 2013-11-08 11:41:29 -06:00
Max Lynch
74e28c61c5 Much faster pull to refresh 2013-11-08 11:22:51 -06:00
Max Lynch
d37ec6fca2 Pull to refresh work for scroll #56 2013-11-07 17:38:35 -06:00
Max Lynch
a84538026b Content scroll test. 2013-10-23 09:01:53 -05:00
Max Lynch
a7fbaac5db Angular tests running, content scoping 2013-10-02 19:47:21 -05:00