Frappe.render_template usage error?

Hi guys getting an error any ideas?, I am following the example usage in payment.js here.

i have added in hooks file
app_include_js = “assets/js/select_batch.html”

make_batch: function () {
		var me = this;
		$(this.$body).empty();
		$(this.$body).html(frappe.render_template('select_batch', this.frm.doc))
		this.bind_batch_event()

	},

There browser console

@vivek,

instead of adding the template in app_include_js add the file reference to build.json it will create the minified js file link the minefield js file in app_include_js

e.g. check the following

https://github.com/frappe/frappe/blob/develop/frappe/public/build.json#L217

1 Like

@makarand_b Ah yes! addded it to build.json. ran bench build and it worked! ty!