loopback-example-angular-live-set icon indicating copy to clipboard operation
loopback-example-angular-live-set copied to clipboard

Is it working on Ionic? Mine is not

Open radiegtya opened this issue 11 years ago • 2 comments

Is this live-set module working on ionic? because mine is not working. and i don't get any error.

here is my code:

on Main App

angular.module('starter', ['ionic', 'starter.controllers', 'lbServices', 'ls.LiveSet', 'ls.ChangeStream'])
//etc............

on Controller

angular.module('starter.controllers', [])
.controller('ProductsCtrl', function($scope, $ionicModal, Product, createChangeStream, LiveSet) {
            var src = new EventSource('http://localhost:3000/api/products/change-stream?_format=event-source');
            var changes = createChangeStream(src);
            var set;

            Product.find().$promise.then(function(results) {
                set = new LiveSet(results, changes);
                $scope.products = set.toLiveArray();
            });

            changes.on('data', function(update) {
                // add the new data to the chart
                console.log('something happened')
                console.log(update)
            });
//etc.................

My data is shown like expected, but the realtime thing is not working. (console not printing anything) Please help

radiegtya avatar Sep 29 '15 03:09 radiegtya

Can you provide a link to a test project? See https://github.com/strongloop/loopback/wiki/Reporting-issues#bug-report.

0candy avatar Nov 18 '15 15:11 0candy

Closing this as a dup of this: https://github.com/strongloop/angular-live-set/issues/12

0candy avatar Nov 20 '15 21:11 0candy