javascript - Angular -- Failed to Instantiate Module -
I'm trying to understand the client side of an application I error: due to the [$ Injector: Named] module The module failed to instantify Facebook: using encoder, and when I try to load the page that I get,
uncheck error: [$ Injector: Facebook 'available] is not! You either misspelled the name of the module or forgot to load it. If a module is registering, make sure you specify the dependency in the form of the second argument. Http://errors.angularjs.org/1.3.0-rc.5/$injector/nomod?p0=Facebook I downloaded and included angle and angular resources They do all the compilation before application.js, and I have moved my tags from the HTML tags to the body tag.
With any thought what can I do to do this work? It seems simple to get the module to work, but it denies it.
-application.html.erb
& lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "/ property / angle / angular .js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "/ property / angle / angular-processing.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "/ property / angle / angular-way.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt;% = javascript_include_tag "Application"% & gt; & Lt;% = stylesheet_link_tag "application", media: "all"% & gt; & Lt;% = csrf_meta_tags% & gt; & Lt ;! - [If LT IE 9] & gt; & Lt; Script src = "http://html5shim.googlecode.com/svn/trunk/html5.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; & Lt; [Endif] - & gt; & Lt; / Head & gt; & Lt; Body ng-app = "Facebook" & gt; & Lt; Div ng-controller = "MainCtrl" & gt; & Lt;% = time.Now.strafttime ("% m /% d /% Y")%> & Lt; Br> & Lt;% = time.NEW Strftime ("% I:% M:% S")%> & Lt; Div class = "navbar navbar-fixed-top" & gt; & Lt; Div class = "navbar-inner" & gt; & Lt; Div class = "container" & gt; & Lt; One class = "brand" href = "#" & gt; Titration & lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "container" & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "span12" & gt; & Lt; Ng-view & gt; & Lt; / Ng-view & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Footer & gt; & Lt; P & gt; & Amp; Copy; IHS Digital 2010 & lt; / P & gt; & Lt; / Footer & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; property / angular / app.js
var app = angular Modules ("Facebook", ["NGRSOSRS", "Facebook Controller", "Facebook. Services", "ngRoute"]); App.config (function ($ migration provider, $ location provider) {$ locationProvider.html5Mode (true); $ route provider. ("/ Facebook / index", {"views / facebook / index.html.erb", administrator: "FacebookIndexCtrl "}").) (Id / "/ facebook / new", {templateUrl: " ", Controller:" FacebookEditCtrl "}). Otherwise ({redirectTo:" / facebook "})}}; App .config (function ($ httpProvider) {$ httpProvider.defaults.headers.common ['X-CSRF- Token'] = $ ('meta [name = CSRF-token]'). Attr ('content');}) ; application.js
// // are required Angular // = Required angle-resource // = Bootstrap is required // is required. / Cangular / App // / require_tree ./angular I load order files I've tried 50 times for spelling errors, and I'm out of ideas.
< P> Your code javascript_include_tag "application" The file is trying to load application.js, then your Konarser JS file will appear on your HTML page Not even loaded in I do.
I do not know your project structure, so I
& lt; Script src = "path / to / your / app.js" type = "text / javascript" & gt; & Lt; / Script & gt; or
javascript_include_tag "app"
Comments
Post a Comment