Location of Directive include statement


Just going through the final steps for the "App Market" section. I was having trouble with the "Install" buttons displaying at all. When I ran my code, it was valid according to codecademy, but the buttons weren't showing up. I then realized that my directive include statement (<script src="js/directives/installApp.js"></script>) was up in the head tag of the index.html (old habits) document rather than at the bottom under the "Directives" comment with the other directive include.

Is it required for all angular.js files to be included at the end of the body of the html page in order for them to work properly?


Not always but you can get some weird behaviour from putting them in different locations, especially with Angular I have found.

The scripts are intialized in order so if, for example, a directive is passed before the module - it may give you some grief.