Compiles an HTML string or DOM into a template and produces a template function, which can then be used to link scope and the template together.