mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Finally fixed disappearing headers from dynamic columns.
Bind-once optimizations.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
module.exports = function ($http, $templateCache, $compile) {
|
||||
var cache = {}
|
||||
|
||||
return function (src, scope, cloneAttachFn) {
|
||||
var compileFn = cache[src]
|
||||
if (compileFn) {
|
||||
compileFn(scope, cloneAttachFn)
|
||||
} else {
|
||||
$http.get(src, { cache: $templateCache }).success(function (response) {
|
||||
var responseContents = angular.element('<div></div>').html(response).contents()
|
||||
compileFn = cache[src] = $compile(responseContents)
|
||||
compileFn(scope, cloneAttachFn)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user