为了账号安全,请及时绑定邮箱和手机立即绑定

怎样多次调用templateCache里缓存的key

var app=angular.module("myApp",[]);
app.run(function($templateCache){
    $templateCache.put("hello.html","<div>hello~~~~</div>")
})
app.directive("hello",function($templateCache){
    return{
        restrict:"AECM",
        template:$templateCache.get("hello.html"),
        repace:true    
    }        
})
app.directive("hello1",function($templateCache){
    return{
        restrice:"AECM",
        template:$templateCache.get("hello.html"),
        replace:true,    
    }    
})

正在回答

举报

0/150
提交
取消
AngularJS实战
  • 参与学习       205391    人
  • 解答问题       1225    个

一起学习AngularJS的基础教程,通过实例学习并学会AngularJS

进入课程

怎样多次调用templateCache里缓存的key

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号