Este sitio web funciona mejor con JavaScript.
Inicio
Explorar
Ayuda
Iniciar sesión
jan
/
mustache.js
réplica de
https://github.com/janl/mustache.js
Seguir
1
Destacar
0
Fork
0
Código
Incidencias
0
Lanzamientos
46
Wiki
Actividad
Explorar el Código
Add support for resolving template functions using object prototype instead of current view object
pull/514/head
Brook Zhou
hace 10 años
padre
c31df4bb9f
commit
b5fffe9c1e
Se han
modificado 1 ficheros
con
7 adiciones
y
2 borrados
Dividir vista
Opciones de diferencias
Mostrar estadísticas
Descargar archivo de parche
Descargar archivo de diferencias
+7
-2
mustache.js
+ 7
- 2
mustache.js
Ver fichero
@@ -414,8 +414,13 @@
cache[name] = value;
}
if (isFunction(value))
value = value.call(this.view);
if (isFunction(value)){
if (names && names.length > 1 && typeof Object.getPrototypeOf(names[names.length-2])[names[names.length-1]] === 'function'){
value = value.call(names[names.length-2]);
} else {
value = value.call(this.view);
}
}
return value;
};
Escribir
Vista previa
Cargando…
Cancelar
Guardar