ionic-framework
Version:
56 lines • 2.66 kB
JavaScript
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var core_1 = require('angular2/core');
var core_2 = require('angular2/core');
var ionic_1 = require('ionic/ionic');
var E2EApp = (function () {
function E2EApp() {
this.items = [];
for (var i = 0; i < 1000; i++) {
this.items.push({
title: 'Item ' + i
});
}
}
E2EApp = __decorate([
ionic_1.App({
templateUrl: 'main.html',
directives: [core_2.forwardRef(function () { return ItemCellTemplate; })]
}),
__metadata('design:paramtypes', [])
], E2EApp);
return E2EApp;
})();
/*
Used to find and register headers in a view, and this directive's
content will be moved up to the common navbar location, and created
using the same context as the view's content area.
*/
var ItemCellTemplate = (function () {
function ItemCellTemplate(list, viewContainer, protoViewRef) {
console.log('Item cell template', list, viewContainer, protoViewRef);
this.protoViewRef = protoViewRef;
this.viewContainer = viewContainer;
list.setItemTemplate(this);
}
ItemCellTemplate = __decorate([
core_2.Directive({
selector: 'template[cell]'
}),
__param(0, core_2.Host()),
__metadata('design:paramtypes', [(typeof (_a = typeof ionic_1.List !== 'undefined' && ionic_1.List) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ProtoViewRef !== 'undefined' && core_1.ProtoViewRef) === 'function' && _c) || Object])
], ItemCellTemplate);
return ItemCellTemplate;
var _a, _b, _c;
})();
exports.ItemCellTemplate = ItemCellTemplate;