0

On latest onsenui/angular versions I get an error on bootstrap

<html>
<head>
   <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
   <script src="https://unpkg.com/onsenui/js/onsenui.min.js"></script>
    <script>
        ons.bootstrap();
    </script>
</head>
</html>

replacing the js with an older versions such as the bellow, everything works fine.

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script src="https://cdn.rawgit.com/OnsenUI/OnsenUI/1.2.2/build/js/onsenui.min.js"></script>
scatman
  • 14,109
  • 22
  • 70
  • 93

2 Answers2

0

Maybe it's because the version of Onsen UI. You can copy-paste those two onsen url to your browser. The first url points to Onsen UI - 2.5 version and the second one is 1.2.2. I guess version 2.5 doesn't support or being supported by angular 1.6.4.

Also I tried on my environment. If you set angular as 1.6.4 and Onsen UI is 1.2.2, it could worked well.

Ma Hans
  • 11
  • 1
0

I had to add angular-onsenui js for this to work! I am not sure why on older versions there was no need to add this js.

<script src="https://cdnjs.cloudflare.com/ajax/libs/onsen/2.5.1/js/angular-onsenui.min.js"></script>
scatman
  • 14,109
  • 22
  • 70
  • 93