怎樣多次調(diào)用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,?? ?
?? ?}?? ?
})