mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
Scroll stuff
This commit is contained in:
8
js/ext/angular/src/directive/ionicList.js
vendored
8
js/ext/angular/src/directive/ionicList.js
vendored
@ -24,6 +24,9 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
</div>\
|
||||
<div class="item-content slide-left" ng-transclude>\
|
||||
</div>\
|
||||
<div class="item-drag" ng-if="canReorder && isEditing">\
|
||||
<button data-ionic-action="reorder" class="button button-icon"><i ng-class="reorderIcon"></i></button>\
|
||||
</div>\
|
||||
<div class="item-options" ng-if="canSwipe && !isEditing && showOptions">\
|
||||
<button ng-click="buttonClicked(button)" class="button" ng-class="button.type" ng-repeat="button in buttons">{{button.text}}</button>\
|
||||
</div>\
|
||||
@ -104,7 +107,10 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
|
||||
compile: function(element, attr, transclude) {
|
||||
return function($scope, $element, $attr) {
|
||||
var lv = new ionic.views.List({el: $element[0]});
|
||||
var lv = new ionic.views.ListView({
|
||||
el: $element[0],
|
||||
listEl: $element[0].children[0]
|
||||
});
|
||||
|
||||
if(attr.animation) {
|
||||
$element.addClass(attr.animation);
|
||||
|
||||
21
js/ext/angular/src/directive/ionicScroll.js
vendored
Normal file
21
js/ext/angular/src/directive/ionicScroll.js
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @description
|
||||
* The scroll directive lets you enable a content area for
|
||||
* our custom momentum scrolling area. The benefit to a custom
|
||||
* scroll area is configurability, and avoidance of the
|
||||
* buggy -webkit-overflow-scrolling: touch.
|
||||
*/
|
||||
|
||||
angular.module('ionic.ui.scroll', [])
|
||||
|
||||
.directive('scroll', function() {
|
||||
return {
|
||||
restrict: 'ECA',
|
||||
replace: true,
|
||||
transclude: true,
|
||||
template: '<div class="scroll-content" ng-transclude></div>'
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user