0
votes

I'm started to use OnsenUI with Angular.

In some patterns ons. functions are used (like ons.bootstrap() ).

But in my case, it doesn't work.

My navigator error consol is like this ReferenceError: ons is not defined

If someone have some idea to fix my problem it will be great :)

Thanks

Just for information : It was just because i was not up to date with onsen.

1

1 Answers

0
votes

Have you included angular.js and onsenui.js before calling the method?

For example if you're using a CDN you can do:

<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>
<script>
  ons.bootstrap();
</script>

If you do this do you still get the same error? Are you using IE?