plunker always refers to github script link - angularjs

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

Related

Angular JS angular.js:116 Uncaught Error: [$injector:modulerr]

Hello i am getting this following error in angular js after uploading my code in staging. my code is working fine on local and ngrok also
Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:modulerr] Failed to instantiate module pascalprecht.translate due to:
Error: [$injector:nomod] Module 'pascalprecht.translate' 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 help
maybe in your staging server, you didn't install a language translation file.Please check
Thanks

Failed to instantiate module angular-jwt due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)

In an AngularJS I'm trying to instantiate angular-jwt. But it fails,
although I have in my app.js file:
angular.module('xxx', ['ngRoute', 'angular-jwt'])
.config(config).run(run);
and in my index.html:
...
<script src="node_modules/angular-route/angular-route.js"></script>
<script src="node-modules/angular-jwt/dist/angular-jwt.js"></script>
<script src="angular-app/app.js"></script>
...
Chrome gives the usual error:
Failed to instantiate module xxx due to:
Error: [$injector:modulerr] Failed to instantiate module angular-jwt due to:
Error: [$injector:nomod] Module 'angular-jwt' 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.
Firefox is pointing to the real reason? It says:
The resource from “http://localhost:3000/node-modules/angular-jwt/dist/angular-jwt.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
Error: [$injector:modulerr] Failed to instantiate module meanhotel due to:
[$injector:modulerr] Failed to instantiate module angular-jwt due to:
[$injector:nomod] Module 'angular-jwt' 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.
The version of angular-jwt is angular-jwt#0.1.11.
Why is it thinking angular-jwt.js is text/html?
Path problem, I wrote node-modules, when it should be node_modules.

Error blank page with gulp dist:serve

vendor-bed50f88.js:31 Uncaught Error:
[$injector:modulerr] Failed to instantiate module angularMaterialAdmin due to:
Error: [$injector:nomod] Module 'angularMaterialAdmin' 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.4/$injector/nomod?p0=angularMaterialAdmin
http://errors.angularjs.org/1.6.4/$injector/modulerr?
Did you include "angularMaterialAdmin" within the module that is attempting to use it?
Such as...
angular.module('myMainModule', ['angularMaterialAdmin']);
If this module is in a separate file, is the reference to this file included in your main html page via a script element?

AngularJS error: Module 'ngCsv' is not available

I have two computers running the identical code pulled from github. Both computers are running on Ubuntu 16 and everything was fine until a new dependency (ngCsv) was added to the code. Since then, I get following error but only on one machine:
angular.js:4053 Uncaught Error: [$injector:modulerr] Failed to instantiate module lergoApp due to:
Error: [$injector:modulerr] Failed to instantiate module ngCsv due to:
Error: [$injector:nomod] Module 'ngCsv' 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.
What could cause this issue?
Install ngCsv using npm and add the ngCsv moduleName in your dependency injection.
the problem was solved by deleting the entire folder and cloning from github

Mocking angular modules to pass karma testing

I recently implemented flash messages into my controller which has led to all of my karma tests failing. I saw another post suggested making a fake module and injecting that in but it does not seem best practice.
Is there a simple way of mocking 'angular-flash' from my controller?
edit:
this is the start of the stack error:
Error: [$injector:modulerr] Failed to instantiate module ShopTill due to:
Error: [$injector:modulerr] Failed to instantiate module flash due to:
Error: [$injector:nomod] Module 'flash' 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.4.0/$injector/nomod?p0=flash
at /Users/edobrien/Documents/projects/Clothing-Retailer/bower_components/angular/angular.js:1955
at ensure (/Users/edobrien/Documents/projects/Clothing-Retailer/bower_components/angular/angular.js:1877)
at module (/Users/edobrien/Documents/projects/Clothing-Retailer/bower_components/angular/angular.js:2192)
at /Users/edobrien/Documents/projects/Clothing-Retailer/bower_components/angular/angular.js:4338
at forEach (/Users/edobrien/Documents/projects/Clothing-Retailer/bower_components/angular/angular.js:336)
at loadModules (/Users/edobrien/Documents/projects/Clothing-Retailer/bower_components/angular/angular.js:4364)
at /Users/edobrien/Documents/proj
but it works when I look on localhost, so it must be an issue with the test.... any help?

Resources