Using Onsen in Production with Angular 1 and Cordova
-
myApp.config(['$compileProvider', function ($compileProvider) { $compileProvider.debugInfoEnabled(false); }]);
that breaks onsen and is recommended for production angular - guess im SOL there.
Also, what files do i need to include in my compiled cordova project?
would it be safe to simply drop all
un minified
files? Im not sure i use any of the font awesome stuff - but i did use a coupleionicons
Also - what JS files are required? here are my current includes in
index.html
<link rel="stylesheet" href="lib/onsenui/css/onsenui.min.css"/> <link rel="stylesheet" href="lib/onsenui/css/onsen-css-components.min.css"/> <script src="lib/onsenui/js/onsenui.min.js"></script> <script src="lib/onsenui/js/angular-onsenui.min.js"></script>
the app works great so is it safe to simply drop all files from production build that i didn’t explicitly include?
-
Yes, you can safely remove the unminified files (and any other files you are not using) from your builds. Your included JS files look fine, I do not see anything missing there.
As for
$compileProvider.debugInfoEnabled(false)
, it should work with Onsen UI. If it doesn’t, there may be a bug with one of the components which prevents it from working. If you know which component exactly is causing it, please do file an issue at https://github.com/OnsenUI/OnsenUI/issues and we’ll do our best to fix it!