Here is one thing I'm used to: angular directives
angular.module('app.directives').directive('login', ['$templateCache', function ($templateCache) {
return {
restrict: 'E',
template: $templateCache.get('directives/login/login.html'),
controller: 'LoginController as vm',
scope: true
};
}]);
I was very attached to using Template Cache to add HTML content to my directive template. Now with angular 1.5 there is this new thing that all cool kids use called component () , which I give to see if it is really good, and I'm stuck in this very initial part: how to enter things in the component itself (and not in the controller )?
In this case, you can see that I introduce the $ templateCache dependency in the login directive. How can I rewrite this directive as a component? (bearing in mind my desire to use $ templateCache via templateUrl)