|
|
@@ -16,15 +16,9 @@ exports.$mount = function (el) {
|
|
|
_.warn('$mount() should be called only once.')
|
|
|
return
|
|
|
}
|
|
|
+ el = _.query(el)
|
|
|
if (!el) {
|
|
|
el = document.createElement('div')
|
|
|
- } else if (typeof el === 'string') {
|
|
|
- var selector = el
|
|
|
- el = document.querySelector(el)
|
|
|
- if (!el) {
|
|
|
- _.warn('Cannot find element: ' + selector)
|
|
|
- return
|
|
|
- }
|
|
|
}
|
|
|
this._compile(el)
|
|
|
this._isCompiled = true
|
|
|
@@ -70,4 +64,4 @@ exports.$destroy = function (remove, deferCleanup) {
|
|
|
|
|
|
exports.$compile = function (el, host) {
|
|
|
return compiler.compile(el, this.$options, true, host)(this, el)
|
|
|
-}
|
|
|
+}
|