Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 99250

Cordova/Angular/Mobile View Navigation Causes Cannot call method 'triggerBeforeShow' of undefined

$
0
0
I have an angular application that runs fine on the web and in ripple but the following error on my android device and in the android emulator:

Uncaught TypeError: Cannot call method 'triggerBeforeShow' of undefined

 

The application has a stub default view that redirects to the main home view.

 

A sample cordova project to reproduce the error is included.  Run from VS Empulator 5" KitKat or from an android device.

 
<!DOCTYPE html>
<html>
<head>
    <metacharset="utf-8"/>
 
    <!--
        Customize the content security policy in the meta tag below as needed. Add 'unsafe-inline' to default-src to enable inline JavaScript.
        For details, see http://go.microsoft.com/fwlink/?LinkID=617521
    -->
    <metahttp-equiv="Content-Security-Policy"content="default-src  'self' http://cdn.kendostatic.com ; http://ajax.googleapis.comhttp://code.jquery.com ; https://caredarewebapi.azurewebsites.net ; https://localhost:44309/   https://localhost:44300/  https://caredarestorage.blob.core.windows.net/ 'unsafe-eval' 'unsafe-inline' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
    <title>CorovaStartupNavigationTest</title>
 
    <!-- CorovaStartupNavigationTest references -->
    <linkhref="css/kendo.mobile.all.min.css"rel="stylesheet"/>
 
 
 
    <scriptsrc="scripts/index.js"></script>
</head>
<bodykendo-mobile-application skin="'flat'"ng-app="sushiMobileApp">
    <kendo-mobile-viewid="viewLogin"data-title="Login"ng-controller="indexController"k-on-before-show="showHome(kendoEvent)">
    </kendo-mobile-view>
 
    <scriptsrc="cordova.js"></script>
    <scriptsrc="scripts/platformOverrides.js"></script>
    <scriptsrc="scripts/jquery.min.js"></script>
    <scriptsrc="scripts/angular.js"></script>
    <scriptsrc="scripts/kendo.all.min.js"></script>
    <scriptsrc="app/modules/cdlogin.js"></script>
 
    <script>
        angular.module('sushiMobileApp', ['kendo.directives', 'cdlogin'])
         .controller('indexController', ['$scope', function ($scope) {
             $scope.showHome = function (kendoEvent) {
                 kendo.mobile.application.navigate("/app/views/viewtabhome.html");
             }
 
             $scope.onCommand = function (kendoEvent) {
                 $scope.command = kendoEvent.currentTarget.data("command");
                 switch ($scope.command) {
                     case "login":
                         kendo.mobile.application.navigate('/app/views/viewlogin.html');
                         break;
                 }
             }
         }]);
        ;
    </script>
 
</body>
 
 
</html>

Viewing all articles
Browse latest Browse all 99250

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>