Search code examples
jqueryangularjscordovaonsen-ui

Not able to get output


I am new to hybrid app development using Cordova with Onsen .

My project was working fine but I changed some script links but now I am not able to see the output.

I just asked a question on SO this link and till then everything was correct.

I have shared the project folder on FileDropper

Below is the output :

index.html

enter image description here

p2.html

enter image description here

I have linked p2.html in index.html but its not displaying when I open index.html

Thanks in Advance


Solution

  • I looked at your project - it looks like you upgraded to Onsen 2. In that case in order to use Onsen UI with Angular you need to include angular-onsenui.

    <script type="text/javascript" src="js/onsenui.min.js"></script>
    <script type="text/javascript" src="js/angular-onsenui.min.js"></script>
    

    And also later you need to call ons.bootstrap(). You can do that either in the empty script which you have right before the body, or just add it inside your js/index.js file.

    I made these 2 changes and everything was working. :)