|
|
@@ -25,7 +25,6 @@ module.exports = {
|
|
|
ctn.insertBefore(this.ref, el)
|
|
|
ctn.removeChild(el)
|
|
|
|
|
|
- this.initiated = false
|
|
|
this.collection = null
|
|
|
this.vms = null
|
|
|
|
|
|
@@ -41,13 +40,6 @@ module.exports = {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // if initiating with an empty collection, we need to
|
|
|
- // force a compile so that we get all the bindings for
|
|
|
- // dependency extraction.
|
|
|
- if (!this.initiated && (!collection || !collection.length)) {
|
|
|
- this.dryBuild()
|
|
|
- }
|
|
|
-
|
|
|
// keep reference of old data and VMs
|
|
|
// so we can reuse them if possible
|
|
|
this.oldVMs = this.vms
|
|
|
@@ -65,24 +57,6 @@ module.exports = {
|
|
|
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * Run a dry build just to collect bindings
|
|
|
- */
|
|
|
- dryBuild: function () {
|
|
|
- var el = this.el.cloneNode(true),
|
|
|
- Ctor = this.compiler.resolveComponent(el)
|
|
|
- new Ctor({
|
|
|
- el : el,
|
|
|
- parent : this.vm,
|
|
|
- data : { $index: 0 },
|
|
|
- compilerOptions: {
|
|
|
- repeat: true,
|
|
|
- expCache: this.expCache
|
|
|
- }
|
|
|
- }).$destroy()
|
|
|
- this.initiated = true
|
|
|
- },
|
|
|
-
|
|
|
init: function (collection, isObject) {
|
|
|
var vm, vms = []
|
|
|
for (var i = 0, l = collection.length; i < l; i++) {
|