47998

Error in karma testing:oc.lazyLoad

Question:

I am getting this error in Karma while testing

<blockquote>

Error: [$injector:modulerr] Failed to instantiate module *** due to: Error: [$injector:modulerr] Failed to instantiate module oc.lazyLoad due to: No module found during bootstrap, unable to init ocLazyLoad

</blockquote>

This is my angular init:

<pre class="snippet-code-js lang-js prettyprint-override">angular.module('*** ', [ 'ui.router', 'ui.bootstrap', 'oc.lazyLoad', 'ngResource', 'pascalprecht.translate', ])

Can you help me to resolve this please

Answer1:

I've resolved this problem by installing ocLazyLoad another time and add its path to karma.comfig.js files

Recommend

  • Creating a ToolTip Managed bean
  • Append canvas images to input array with JavaScript
  • Should an IntersectionObserver be disconnected when element is removed
  • WCF Serialization and NHibernate Proxy for a Single Entity Reference
  • Calc SUM total of pivoted table by two columns into predefined table?
  • WCF Serialization and NHibernate Proxy for a Single Entity Reference
  • T-SQL Pivot Add Total Row
  • “Improper data type” with query in Rocket UNIVERSE database
  • Capturing STDOUT in RSpec
  • What exactly is the height of modalPresentationStyle - FormSheet on iPad?
  • Bootstrap Popover showing at wrong place upon zoom in/out or resizing Browser window
  • Why does IE8 fail to resolve my JQuery selector for a checked radio option?
  • Mockery and Laravel constructor injection
  • Are there “Dynamic Playlists” of unit tests in Visual Studio?
  • Slicing an SPA into several components and use AngularJS
  • to implement a spinner in angular2+
  • Angular Bootstrap Carousel Slide Transition not working correctly
  • Scanner nextInt() and hasNextInt() problems
  • C# - Most efficient way to iterate through multiple arrays/list
  • Consuming a WCF service in a Java Client using wsHttpBinding
  • jQuery: How to AJAXify WordPress Search?
  • Bootstrap (v3.3.4) glyphicons not displayed in IE when refresh page (F5)
  • Who propagate bugfixes across branches (corporate development)?
  • Why use database factory in asp.net mvc?
  • Unable to decode certificate at client new X509Certificate2()
  • How do I exclude a dependency in provided scope when running in Maven test scope?
  • Is there a perl module to validate passwords stored in “{crypt}hashedpassword” “{ssha}hashedpassword
  • preg_replace Double Spaces to tab (\\t) at the beginning of a line
  • Meteor helpers not available in Angular template
  • ImageMagick, replace semi-transparent white with opaque white
  • The plugin 'org.apache.maven.plugins:maven-jboss-as-plugin' does not exist or no valid ver
  • Launch Runnable Jar from Web Start
  • sending/ receiving email in Java
  • Eraser for UIBezierPath
  • Compare two NSDates in iPhone
  • bootstrap to use multiple ng-app
  • SetUp method failed while running tests from teamcity
  • Load html files in TinyMce
  • using HTMLImports.whenReady not working in chrome
  • What are the advantages and disadvantages of reading an entire file into a single String as opposed