Monaca Onsen UI Discord Chat Github Repo

Onsen Running on Android and Browser with different behavior



  • Hi, I am pretty new using Onsen and I have some issue and I can not figure out what is happening. I am building an application with Apache Cordova then I try to run it using the command “cordova run browser” everything works fine but when I deploy to a device using “cordova run android” the beahvior is pretty different, and application doesn’t work correctly or doesn’t work. How can I find what is happening when I run the application on device?
    I am using:

    • cordova 6.4.0

    • OnsenUI 2.0.4

    • AngularJS 1.4.8

    • Running on browser Google Chrome 54.0…

    • Running on device LG90 with Android 4.4.2

    Best Regards!



  • @Felix-Ivan-Romero-Rodríguez Can you help clarify what does not work? Are you able to make a codepen with an example that reproduces the issue?



  • @munsterlander For instance I got this simple view
    template

    <ons-page ng-controller="VisionController" modifier="material">
        <ons-toolbar >
    
            <div class="left">
                <ons-toolbar-button ng-click="carousel.prev()" modifier="material">
                    <ons-icon icon="md-chevron-left"></ons-icon>
                </ons-toolbar-button>
            </div>
            <div class="center" ng-click="carousel.next()">Visión  para Vivir</div>
            <div class="right">
                <ons-toolbar-button ng-click="carousel.next()" modifier="material">
                    <ons-icon icon="md-chevron-right"></ons-icon>
                </ons-toolbar-button>
            </div>
        </ons-toolbar>
        <ons-carousel swipeable overscrollable fullscreen auto-scroll modifier="material" var="carousel" >
            <ons-carousel-item data-ng-repeat="doc in documents" modifier="material">
    
                <div class="list__item__left">
                    <span class="contact-initials">{{doc.title}}</span>
                </div>
                <div class="list__item__center">
                    <ons-ripple color="rgba(0, 0, 0, 0.1)"></ons-ripple>
                    <div>{{doc.content}}</div>
                </div>
            </ons-carousel-item>
        </ons-carousel>
    
    
    </ons-page>
    
    

    controller

    'use strict';
    angular.module('vision4living').controller('VisionController',function ($scope) {    
        var documents  = [];
        //ons.notification.alert({
        //    message: 'pepe'
        //});
    
        for (var i = 0; i < 100; i++) 
        {
            documents.push({
                "title":"My title" +i*2,
                "content":"Lorem ipsum"+i*3,
                "note":"Anima"+i*4
            });
        }
    
        $scope.documents = documents;
    
        
    
    });
    

    Running on web works fine, the carousel, but in the device it is just static, the carousel doesn’t work
    This is the url of the project Vision4Living