equal
deleted
inserted
replaced
34 escape: /\{\{([^\}]+?)\}\}(?!\})/g, |
34 escape: /\{\{([^\}]+?)\}\}(?!\})/g, |
35 variable: 'data' |
35 variable: 'data' |
36 }; |
36 }; |
37 |
37 |
38 return function ( data ) { |
38 return function ( data ) { |
|
39 if ( ! document.getElementById( 'tmpl-' + id ) ) { |
|
40 throw new Error( 'Template not found: ' + '#tmpl-' + id ); |
|
41 } |
39 compiled = compiled || _.template( $( '#tmpl-' + id ).html(), options ); |
42 compiled = compiled || _.template( $( '#tmpl-' + id ).html(), options ); |
40 return compiled( data ); |
43 return compiled( data ); |
41 }; |
44 }; |
42 }); |
45 }); |
43 |
46 |