My website is running smoothly with AngularJS on one page, but I'm encountering an error in the console on other pages that do not use AngularJS. The error message reads:
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.3.13/$injector/modulerr...
On all pages, including those without AngularJS actively implemented yet, angular.min.js and angular-locale_nl-nl.js (source: https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.2.15/angular-locale_nl-nl.js) are loaded in the head section. Additionally, myApp.js is also loaded in the head-section.
The content of myApp.js is as follows:
var myApp = angular.module('myApp',['']);
The html-tag contains a data-ng-app=”myApp” attribute.
The only difference between the functional Angular page and the ones showing errors is the presence of an Angular controller. On the working page, myController.js is loaded before the closing body tag, containing a basic controller managing some $scope variables. A div inside the page has a data-ng-controller=”myController” attribute, making everything function correctly. However, on the non-Angular pages, the developer's console displays an error.
I am still learning AngularJS, so any help to resolve this issue would be greatly appreciated! :-D