Error in navigation pushPage



  • Hi All,
    Once I tried to navigate to another page I got following error.

    What is the reason for this issue?

    Thank You

    $scope.blogItemClick = function (item) {
               
                myNavigator.pushPage('page3.html');
            };
    

    **Error: **

    TypeError: Cannot read property ‘$new’ of null
    at Class.extend._createPageScope (file:///data/data/mobi.monaca.debugger/files/projects/cloud/56ffbab0fd17349877bc833f/www/components/loader.js:1472:19952)
    at Class.<anonymous> (file:///data/data/mobi.monaca.debugger/files/projects/cloud/56ffbab0fd17349877bc833f/www/components/loader.js:1472:18905)
    at processQueue (file:///data/data/mobi.monaca.debugger/files/projects/cloud/56ffbab0fd17349877bc833f/www/components/loader.js:1463:27583)
    at file:///data/data/mobi.monaca.debugger/files/projects/cloud/56ffbab0fd17349877bc833f/www/components/loader.js:1463:27850
    at Scope.$eval (file:///data/data/mobi.monaca.debugger/files/projects/cloud/56ffbab0fd17349877bc833f/www/components/loader.js:1464:8712)
    at Scope.$digest (file:///data/data/mobi.monaca.debugger/files/projects/cloud/56ffbab0fd17349877bc833f/www/components/loader.js:1464:6452)
    at Scope.$apply (file:///data/data/mobi.monaca.debugger/files/projects/cloud/56ffbab0fd17349877bc833f/www/components/loader.js:1464:9117)
    at done (file:///data/data/mobi.monaca.debugger/files/projects/cloud/56ffbab0fd17349877bc833f/www/components/loader.js:1462:28472)
    at completeRequest (file:///data/data/mobi.monaca.debugger/files/projects/cloud/56ffbab0fd17349877bc833f/www/components/loader.js:1462:32068)
    at XMLHttpRequest.xhr.onload (file:///data/data/mobi.monaca.debugger/files/projects/cloud/56ffbab0fd17349877bc833f/www/components/loader.js:1463:829)



  • @poorna.soysa Generally, that means the object does not exist or has not been attached to the DOM. Typically, this is due to either the time you are calling the function or a scope issue. In your case, I would assume it is a scope issue, i.e. your app has not been registered with the controller.


Log in to reply