Closed jindovu closed 7 years ago
You need to add ngStorage as a dependency in your angular.module call.
var app = angular.module('AngularAuthApp', [
'ngStorage',
'ngRoute',
'angularUtils.directives.dirPagination',
'LocalStorageModule',
'angular-loading-bar',
'authService'
]);
Yes, I have tried it however it's throw new exception Error: [$injector:modulerr] Failed to instantiate module AngularAuthApp due to: [$injector:modulerr] Failed to instantiate module ngStorage due to: [$injector:nomod] Module 'ngStorage' 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.5.8/$injector/nomod?p0=ngStorage minErr/<@http://localhost:5000/lib/angular/angular.js:68:12 module/<@http://localhost:5000/lib/angular/angular.js:2082:17 ensure@http://localhost:5000/lib/angular/angular.js:2006:38 module@http://localhost:5000/lib/angular/angular.js:2080:14 loadModules/<@http://localhost:5000/lib/angular/angular.js:4617:22 forEach@http://localhost:5000/lib/angular/angular.js:321:11 loadModules@http://localhost:5000/lib/angular/angular.js:4601:5 loadModules/<@http://localhost:5000/lib/angular/angular.js:4618:40
And here is my view register Js
<script type="text/javascript" src="lib/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="lib/angular/angular.js"></script>
<script type="text/javascript" src="lib/bootstrap/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="lib/angular-route/angular-route.js"></script>
<script type="text/javascript" src="lib/angular-resource/angular-resource.js"></script>
<script type="text/javascript" src="lib/angular-local-storage/dist/angular-local-storage.js"></script>
<script type="text/javascript" src="lib/angular-utils-pagination/dirPagination.js"></script>
<script type="text/javascript" src="lib/angular-loading-bar/src/loading-bar.js"></script>
<script type="text/javascript" src="lib/ngStorage/dist/angularLocalStorage.min.js"></script>
Did you include the ngStorage.js file?
By the way, it is impossible to read your pastes, they loose all formatting and end up as text and not code :)
Yes, I have been included file in my view, it's not working
<script type="text/javascript" src="lib/ngStorage/dist/angularLocalStorage.min.js"></script>
This isn't our ngStorage. Try adding
<script src="https://cdn.jsdelivr.net/ngstorage/0.3.6/ngStorage.min.js"></script>
OMG, it's working now, Thank you for your help
👍
Hi everyone, I run project and got something wrong, and I don't know why App.js var app = angular.module('AngularAuthApp', [ 'ngRoute', "angularUtils.directives.dirPagination", "LocalStorageModule", "angular-loading-bar", "authService"]);
Controller (function () { 'use strict'; angular .module('AngularAuthApp') .controller('loginController', loginController);
})(); Service (function () { 'use strict';
})(); Please help me, Thank you so much.