这篇文章 详细介绍了如何在事件上绑定加载模板部分。
但是,如果我想在页面加载时将模板部分加载到像 Smarty 这样的模板引擎中呢?
例如在 Smarty 中:
<html>
<body>
{include file="templates/header.html"}
<span>Dude, this has too be possible in Angular JS...</span>
{include file="templates/footer.html"}
</body>
</html>