Are both javascript files being loaded by index.html?

On Thu, Oct 2, 2014 at 4:52 PM, Vincent Cueto <[email protected]>
wrote:

> Hi all !!
>
> I am new with angular and i need your help to understand what's is my
> problem :)
>
> I created a simple app.js like this one :
>
> (function() {
>   var app = angular.module('teamStats', []);
>
>   app.directive("header", function() {
>   return {
> restrict: 'E',
> templateUrl: "header.html"
>   };
>   });
>
>   app.controller('TeamController', function(){
>
>   });
>
> })();
>
> Here there is no dependency, i just get my header in index.html thanks to
> the code below and that is working !!! WOOT i am so happy !
>
> <header></header>
>
> Now i want tu put the directive calling my header in another file called :
> template.js
>
> (function(){
>     var app = angular.module('template-directives', []);
>
>     app.directive("header", function() {
>       return {
>         restrict: 'E',
>         templateUrl: "header.html"
>       };
>     });
> })();
>
>
> My app.js is now like this :
>
> (function() {
>   var app = angular.module('teamStats', ['template-directives']);
> })();
>
>
> My header doesn't appear in my index.html i don't understand why .. my
> dependency is not correctly set ? i forgot something ?
>
> If someone can help ;) it would be really nice !
> Thanks for all !!
>
> Best regards,
> CUETO Vincent
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to