javascript - specifying jquery as angularjs's dependency generates error in requirejs -
Angle inside the angle of the config () function I am trying to use Element (jQuery cover) and try. However, in the main.js file, as soon as I add angle under the dez, it generates $ injector: modular error (where is the first comment)
The script tag is placed first in my html File
& lt; Script src = "js / vendor / require.min.js" data-main = "js / self / main.js" & gt; & Lt; / Script & gt; main.js file
need.config ({baseUrl: "js / vendor /", path: {"jquery": "jquery-2.1 .1.min "," angular ":" angular.1.2.9.min "}, shim: {" angular ": {deps: [" jquery "], // as soon as I add it, it generates a $ Injector: Modular error export: "angular"}}}); ("Angular"), function (angular) {angular.} Module ("app", []) // ng-ap = "app" prefix & lt; Body & gt; Is defined in Controller ("Acctral", Function ($ scope) {// ng-controller = "appctrl" pre-defined & lt; body & gt; $ scope.sample = 1; // This works fine if I am docs to angle Does not add to. Config});}); Error has gone by removing "ng-app = 'urAppName'"
After configuring page ng-ap to the angular module, manually angular Bootstrap should be bootstrapped by the bootstrap (document.body, ["urAppName"], e.g., Angular.module ("urAppName", []). Controller () .....;
Note that you NG-admin or your model data such as {{modelName}} in the page.
Comments
Post a Comment