Onsen UI + LokiJS: loki not defined?

According to LokiJS: NoSQL in-memory data storage for Cordoba applications

I nested loki- angular.js and then write the following script:

var onsen = angular.module('app', ['onsen', 'lokijs']) .config(['$httpProvider', function($httpProvider) { }]); 

After that, I write the controller, and then test in the browser and get an error message:

 onsen.controller('ListController', ['$scope', 'Loki', function($scope, Loki) { }]); 

Error:

 ReferenceError: loki is not defined at Object.Loki (.../loki-angular.js:29:16) at Object.invoke (https://code.angularjs.org/1.2.12/angular.js:3710:17) 

I just follow the manual from the post, so I'm not sure what is wrong and how to fix it.

Experts, please help!

+5
source share

Source: https://habr.com/ru/post/1240546/


All Articles