使用自定义指令,我想添加一个HTML页面到另一个,如何做到这一点? 自定义指令是如下:如何使用AngularJS中的自定义指令将一个html页面插入到另一个html页面中?
(this is the .js file)
fbModule.directive('fbLogin', function(){
return {
template : html
}
})
和HTML页面包含的是:
(this is the .html file to be included)
<div ng-controller="fbCtrl">
<button ng-click="doFacebookLogin">
<img src="modules/shippingAddress/fastfill_fb.png" width="140px" height="25px;" style="margin-right: 8px; cursor:pointer">
</button>
</div>
在页面内其上面的代码应该来的是:
(this is the .html file in which the above html should come)
<div fbLogin></div>
<div style="font-size: x-small; color: black;">Save on typing. Use your FB data.</div>
请帮助.. 在此先感谢
看看我的回答 – 2014-11-04 09:45:26