I can't use ngMaterial - angularjs

When i use use ngMaterial i have this error
Error: [$injector:modulerr] http://errors.angularjs.org/1.4.7/$injector/modulerr?p0=admin&p1=%5B%24injector%3Amodulerr%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.4.7%2F%24injector%2Fmodulerr%3Fp0%3DngMaterial%26p1%3D%255B%2524injector%253Amodulerr%255D%2520http%253A%252F%252Ferrors.angularjs.org%252F1.4.7%252F%2524injector%252Fmodulerr%253Fp0%253DngAnimate%2526p1%253D%25255B%252524injector%25253Anomod%25255D%252520http%25253A%25252F%25252Ferrors.angularjs.org%25252F1.4.7%25252F%252524injector%25252Fnomod%25253Fp0%25253DngAnimate%25250AI%25252F%25253C%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A6%25253A416%25250Ade%25252F%25253C%25252F%25253C%25252F%25253C%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A24%25253A186%25250Aa%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A23%25253A252%25250Ade%25252F%25253C%25252F%25253C%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A23%25253A495%25250Ah%25252F%25253C%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A37%25253A427%25250Am%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A7%25253A320%25250Ah%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A37%25253A275%25250Ah%25252F%25253C%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A37%25253A444%25250Am%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A7%25253A320%25250Ah%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A37%25253A275%25250Ah%25252F%25253C%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A37%25253A444%25250Am%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A7%25253A320%25250Ah%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A37%25253A275%25250Afb%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A41%25253A35%25250Azc%25252Fd%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A19%25253A463%25250Azc%252540http%25253A%25252F%25252Fajax.googleapis.com%25252Fajax%25252Flibs%25252Fangularjs%25252F1.4.7%25252Fangular.min.js%25253A20%25253A274%25250A%252540http%25253A%25252F%25252Flocalhost%25253A3000%25252Fadmin%25252Fadmin.js%25253A53%25253A13%25250Am.Callbacks%25252Fj%252540http%25253A%25252F%25252Flocalhost%25253A3000%25252Fadmin%25252Fadmin-content%25252Fjs%25252Fjquery.js%25253A2%25253A27239%25250Am.Callbacks%25252Fk.fireWith%252540http%25253A%25252F%25252Flocalhost%25253A3000%25252Fadmin%25252Fadmin-content%25252Fjs%25252Fjquery.js%25253A2%25253A28057%25250Ax%252540http%25253A%25252F%25252Flocalhost%25253A3000%25252Fadmin%25252Fadmin-content%25252Fjs%25252Fjquery.js%25253A4%25253A21841%25250A.send%25252Fb%252540http%25253A%25252F%25252Flocalhost%25253A3000%25252Fadmin%25252Fadmin-content%25252Fjs%25252Fjquery.js%25253A4%25253A25897%25250A%250AI%252F%253C%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A6%253A416%250Ah%252F%253C%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A38%253A184%250Am%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A7%253A320%250Ah%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A37%253A275%250Ah%252F%253C%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A37%253A444%250Am%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A7%253A320%250Ah%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A37%253A275%250Ah%252F%253C%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A37%253A444%250Am%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A7%253A320%250Ah%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A37%253A275%250Afb%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A41%253A35%250Azc%252Fd%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A19%253A463%250Azc%2540http%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fangularjs%252F1.4.7%252Fangular.min.js%253A20%253A274%250A%2540http%253A%252F%252Flocalhost%253A3000%252Fadmin%252Fadmin.js%253A53%253A13%250Am.Callbacks%252Fj%2540http%253A%252F%252Flocalhost%253A3000%252Fadmin%252Fadmin-content%252Fjs%252Fjquery.js%253A2%253A27239%250Am.Callbacks%252Fk.fireWith%2540http%253A%252F%252Flocalhost%253A3000%252Fadmin%252Fadmin-content%252Fjs%252Fjquery.js%253A2%253A28057%250Ax%2540http%253A%252F%252Flocalhost%253A3000%252Fadmin%252Fadmin-content%252Fjs%252Fjquery.js%253A4%253A21841%250A.send%252Fb%2540http%253A%252F%252Flocalhost%253A3000%252Fadmin%252Fadmin-content%252Fjs%252Fjquery.js%253A4%253A25897%250A%0AI%2F%3C%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.7%2Fangular.min.js%3A6%3A416%0Ah%2F%3C%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.7%2Fangular.min.js%3A38%3A184%0Am%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.7%2Fangular.min.js%3A7%3A320%0Ah%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.7%2Fangular.min.js%3A37%3A275%0Ah%2F%3C%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.7%2Fangular.min.js%3A37%3A444%0Am%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.7%2Fangular.min.js%3A7%3A320%0Ah%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.7%2Fangular.min.js%3A37%3A275%0Afb%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.7%2Fangular.min.js%3A41%3A35%0Azc%2Fd%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.7%2Fangular.min.js%3A19%3A463%0Azc%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.7%2Fangular.min.js%3A20%3A274%0A%40http%3A%2F%2Flocalhost%3A3000%2Fadmin%2Fadmin.js%3A53%3A13%0Am.Callbacks%2Fj%40http%3A%2F%2Flocalhost%3A3000%2Fadmin%2Fadmin-content%2Fjs%2Fjquery.js%3A2%3A27239%0Am.Callbacks%2Fk.fireWith%40http%3A%2F%2Flocalhost%3A3000%2Fadmin%2Fadmin-content%2Fjs%2Fjquery.js%3A2%3A28057%0Ax%40http%3A%2F%2Flocalhost%3A3000%2Fadmin%2Fadmin-content%2Fjs%2Fjquery.js%3A4%3A21841%0A.send%2Fb%40http%3A%2F%2Flocalhost%3A3000%2Fadmin%2Fadmin-content%2Fjs%2Fjquery.js%3A4%3A25897%0A
angular.min.js:6:416

If you follow that link Angular provide some details as to what might be the reason.
Here is a snippet:
Description
This error occurs when a module fails to load due to some exception. The error message above should provide additional context.
A common reason why the module fails to load is that you've forgotten to include the file with the defined module or that the file couldn't be loaded.
So it looks like you have not included the ngMaterial module.

Related

Angular 4 + ui-grid (transpile on browser)

With Angularjs ui-grid used with Angular 4, I can't figure out how to avoid this:
System.js successfully bootstrapped app.
systemjs.config.js:117:9
Unhandled Promise rejection: [$injector:modulerr] Failed to instantiate module $$UpgradeModule due to: zone.js:661:17
[$injector:modulerr] Failed to instantiate module ng1Module due to:
[$injector:modulerr] Failed to instantiate module ui.grid due to:
[$injector:nomod] Module 'ui.grid' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.6.6/$injector/nomod?p0=ui.grid
[...]
See plunk: http://embed.plnkr.co/WxNwrbTXrdUHD5DU791U/
It seems that ui-grid is loaded before AngularJS. How to force the loading of ui-grid after the angularjs one?
Any idea?
UPDATE
I set up a working configuration with some tricks, mainly:
link for angularjs as first one in index.html
link to ui-grid just before the 'systemjs.config.js' one
keep a mapping for angularjs in 'systemjs.config.js':
'angular': 'npm:/angular' + version.a1,
See plunk: https://plnkr.co/edit/bEaNtHxTvlTQ0cLOdC51
But I'm quite unhappy with this last mapping of 'angularjs'. I can't figure out why it's required. Even when working with local copies of packages (i.e. with 'npm:': '../node_modules'), it's still needed, and still linked to a CDN file ...
It seems that all this occurs since version 0.20.x of SystemJS.
Did I miss something obvious? Any idea?

Module 'moduleName' is not available! You either misspelled the module name or forgot to load it

I am new Angular and I have to implement server-side pagination in my project, so I did everything as it has been done in this example:
Server Side Pagination In Angularjs Tutorials
but I get these errors in my web browser console:
GET
http://*********/admin/css/bootstrap.min.css [HTTP/1.1 404 Not Found 1043ms]
GET
http://*********/admin/css/bootstrap-theme.min.css [HTTP/1.1 404 Not Found 1385ms]
GET
http://*********/admin/css/styles.css [HTTP/1.1 404 Not Found 1334ms]
GET
http://*********/admin/lib/angular/angular.js [HTTP/1.1 404 Not Found 1384ms]
GET
http://*********/admin/lib/dirPagination.js [HTTP/1.1 404 Not Found 1383ms]
GET
http://*********/admin/app/app.js
and
Error: [$injector:modulerr] Failed to instantiate module angularTable due to:
[$injector:nomod] Module angularTable is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Please if anyone can help me!
this often happens when you do something like ...
angular.module('myapp').controller(function() {
});
note this code does not create a module called myapp it just references an existing module. The error you are experiencing will happen if you have not yet created the module.
To create the module do this ...
angular.module('myapp', []);
also, don't forget the ng-app directive in your HTML ...
<html ng-app="myapp">
of course, this assumes your script files are loading properly. based on your question your files are failing to load and it is therefore no surprise that myapp has not been created. you should check that the files you are trying to load actually exist on your server. also ensure you know which folder is the root folder from which your web server is serving files. This will help you to get the file paths correct.

'Module ... is not available!' error, when trying to accomplish Angular example on jsFiddle

I'm trying to make an MCVE for my question, but can't get my code working on jsFiddle and get the following error:
Uncaught Error: [$injector:modulerr] Failed to instantiate module carouselApp due to:
Error: [$injector:nomod] Module 'carouselApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Link to my example: https://jsfiddle.net/anatoly314/n0qfj4dk/
What am I doing wrong?
UPDATE: This answer from another SO question helped me to solve the issue: https://stackoverflow.com/a/14733670/947111
I recommend you to select values like below to deploy angularjs application on jsFiddle.
And Don't forget to remove angular.js from External Resources.
EDIT:
If there is not the version you want to use, selecting No wrap - in <body> will solve the problem.

plunker always refers to github script link

I can not execute this plunker because of this error message:
but I am not referencing accordion.js at all from github its locally !!!
What do I wrong that I get that message?
Refused to execute script from 'https://github.com/angular-ui/bootstrap/blob/master/src/accordion/accordion.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. run.plnkr.co/:1
Uncaught Error: [$injector:modulerr] Failed to instantiate module plunker due to:
Error: [$injector:modulerr] Failed to instantiate module ui.bootstrap.accordion due to:
Error: [$injector:nomod] Module 'ui.bootstrap.accordion' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://plnkr.co/edit/WYkxKqUOZAhT07HyuTOh?p=preview
First you have forgotten about to add the bootstrap js, jquery and ui-bootstrap-tpls script to the index.html
Second, you only need the ui.bootstrap dependency.
var app = angular.module('plunker',['ui.bootstrap']);
Finally, here's a working plunker:
http://plnkr.co/edit/Hntx2YihOb3U0HoGMQAQ?p=preview

i got a error when when connecting websocket with angularjs

i am trying to run this
example
i got a error mesasge like this
Error: [$injector:nomod] Module 'MyApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.2.14/$injector/nomod?p0=MyApp
return new Error(message);
anyone suggest how can i implement event handling in angularjs with websockets.
You have to create a module to use it... so you have to have this piece of code
angular.module('MyApp', [/*dependencies or empty array*/])
somewhere in your script - somewhere means before any other angular.module('MyApp').whatever... code

Resources