Closed kmsheng closed 10 years ago
You're right. $templateCache.put should only be fired once. I've added a commit to fix this, please have a look : )
So looking into this more, I see great potential for configuring other parts of the module. Take a look at how angular-strap does this:
https://github.com/mgcrea/angular-strap/blob/master/src/navbar/navbar.js https://github.com/mgcrea/angular-strap/blob/master/src/dropdown/dropdown.js
I really like the simplicity of this approach. Lets start a new pull request following this style.
I can start a new request following angular-strap's style without having a dollar sign prefix naming like what angular-strap does. Because our provider isn't Angular's built-in service. What do you think ?
https://docs.angularjs.org/tutorial/step_05 see Prefix Naming Convention
Sounds good to me.
Ha ha, ok ! : ) I will make another pull request and let you review soon.
Can the provider set the templateCache and then the directive templateUrl could just be a string?