2016-05-24 3 views
0

I AngularJS in IBM MobileFirst FrameWork verwende und ich bin unten FehlerAngularJS gibt mir Injektor Fehler bei IBM MobileFirst

worklight.js:5359 Uncaught Exception: Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.5/ $injector/modulerr?p0=ng&p1=TypeError%3A%…Fpreview%2FAB%2Fcommon%2F0%2Fdefault%2Flibrary%2Fangular.min.js%3A39%3A321) at (compiled_code):40WL.Logger.__log @ worklight.js:5359PUBLIC_API.(anonymous function) @ worklight.js:5741WL.Logger.window.onerror @ worklight.js:5699 angular.min.js:6Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.5/ $injector/modulerr?p0=ng&p1=TypeError%3A%…Fpreview%2FAB%2Fcommon%2F0%2Fdefault%2Flibrary%2Fangular.min.js%3A39%3A321)"

// ************ app.js ******************* 

var app = angular.module('myApp',['ui.router']); 

app.config(function($stateProvider, $urlRouterProvider){ 

    $urlRouterProvider.otherwise('/login'); 

    $stateProvider 
     .state('login',{ 
      url:'/login', 
      templateUrl:'view/login.html', 
      controller:'loginController' 
     }); 

}); 



// ****************** login.js ****************** 

app.controller('loginController',function($scope){}); 
<!-- INDEX.HTML --> 

<!DOCTYPE HTML> 
<html> 
     <head> 
      <meta charset="UTF-8"> 
      <title>AB</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"> 
      <!-- 
       <link rel="shortcut icon" href="images/favicon.png"> 
       <link rel="apple-touch-icon" href="images/apple-touch-icon.png"> 
      --> 
      <link rel="stylesheet" href="css/main.css" /> 
      <link rel="stylesheet" href="css/bootstrap.min.css" /> 
      <link rel="stylesheet" href="css/bootstrap-responsive.min.css" /> 
      <script src="library/jquery.min.js"></script> 
      <script src="library/angular.min.js"></script> 
      <script src="library/angular-ui-router.min.js"></script> 
      <script src="library/bootstrap.min.js"></script> 
      <script src="controller/app.js"></script> 
      <script src="controller/login.js"></script> 
      <script>window.$ = window.jQuery = WLJQ;</script> 
     </head> 
     <body style="display: none;" ng-app="myApp"> 
      <!--application UI goes here--> 

      <div ui-view id="view"></div> 

      <script src="js/initOptions.js"></script> 
      <script src="js/main.js"></script> 
      <script src="js/messages.js"></script> 
     </body> 
</html> 
<div ng-controller="loginController" class="container-fluid"> 
Login Page 
</div> 

Antwort

1

Angular 1.5 bekommen ist nicht kompatibel, siehe hier : Ionic Mobile First Integration

Möglicherweise müssen Sie eine ältere re herunterladen mieten.

+1

Ich benutze angular1.4.9 und jetzt funktioniert es gut für mich – Jay