ionic scrolling is too laggy for windows phone 8 - angularjs

I'm using Ionic to build a hybrid app for Android and Windows Phone 8.1.
When scrolling, the below code:
<ion-content padding="true" scroll="true" direction="y" scrollbar-y="false" scrollbar-x="false" has-bouncing="true">
<!-- creating many paragraphs -->
<p ng-repeat="content in contents">{{content}}</p> //many paragraph
</ion-content>
is working smoothly in Android, but very laggy in Windows Phone 8.1
I even used overflow-scroll, but it is still too slow.
Please advise me any fix or workaround for this issue.
Thanks in adnvance!

This may not be relevant to you, but I had a similar issue. When using the wp8 platform (e.g. ionic platform add wp8) the app seemed to be wrapped in Silverlight and was painfully slow. Pretty unusable.
Changing to a Windows universal app (ionic platform add windows) it was much, much better (but still has other problems not relevant to this post).

Use native scrolling.
Native scrolling can be enabled using overflow-scroll=”true” on your ion-content or using the $ionicConfigProvider to set it globally in current versions of Ionic.

Related

Mobile app framework without angular.js

I'm thinking which frameworks should I use to port an existent application UI to a mobile friendly one.
I've seen Ionic and I was pretty happy with its UI and components until I noticed it requires Angular.js for its functionality.
My project is developed in Knockout.js over Node.js and I'm not planning to start using Angular at this point.
jQuery Mobile seems like another alternative to it but it seems its development its not as active and its community is not as big or as active.
Plus the UI is not native for each OS and it looks as good in big screens.
I've seen other alternatives (Onsen UI, Intel XDK, Sencha Touch, Kendo UI, Framework 7...) but none of them seem to be as popular and as active as Ionic and some of them still need Angular.js.
Isn't there any out of the box framework that doesn't require Angular.js and which provides not only the UI but also the touch features as Ionic does?
Bootstrap might not be at the same level as all of these frameworks.
I would suggest you Onsen UI. Since Onsen UI 2.0 release (at the moment in open beta) the framework is completely agnostic, which means that can work standalone. Nevertheless, it's also still compatible with some of the most famous frameworks like AngularJS 1.x (and Angular 2 in the future), ReactJS (see demo) and KnockoutJS.
Moreover, besides being compatible with iOS and Android, it's one of the few frameworks to be compatible with Windows platform (Windows Phone, Windows Universal App) and to implement Material Design! The learning curve is also very fast.
The community is not so small, as you can see from StackOverflow activity and Gitter Channel. Moreover, the developers are very active in the development, in the issues fix (almost 600 bugs fixed at the moment) and open to listen to the users suggestions.
Take a look at this article about Onsen UI 2.0 and give it a shot.
I suggest you should use any of these UI frameworks
http://www.idangero.us/framework7/get-started/
http://chocolatechip-ui.com/
Save yourself all the stress, Its independent of any Js framework and very simple to implement, just like Bootstrap.
I have actually used the first one. framework7
You can create Mobile Apps UI with Native Look & Feel For Web or Hybrid

angularJS code sharing across hybrid Ionic app and regular mobile website

Ok, so in our 'innovation lab', there is currently a push to use Ionic, an hybrid app framework built on top of Cordova for native access and angularJS for the ‘web code’.
There are also some projects which are pure mobile web, using Angular + bootstrap for responsive design for example.
The thing is some projects coming up will need to have both a mobile web site and native apps (ionic hybrid). Most features and screens will be the same, sharing back end and most of the UI but there still will be some difference.
So my question is; How to architecture a project so that it can be both an ionic project and a normal angular website with 2 different deployment approaches. Most of the code being reused but some views for the mobile website and some views for the hybrid app (using more native components and conventions), maybe some routing differences as well.
Is that even a good idea?
And in the shared code, is there a simple way to know in which case you are? some IF, some directives inactive outside of their context, etc.
It feels like there is some sort of missing link i may be unaware of.
Thanks in advance.
I'm working on this same problem. The approach I'm taking is to use separate templates, and when possible, key CSS off the device detection classes ionic adds to the body tag.
Desktop version (default)
.your-style
Mobile Version
.platform-webview .your-style {...}
.platform-cordova .your-style {...}
There's a repository on on Github that might offer some guidance.
https://github.com/jonathanwax/jw-ionic-desktop
To quote from of the source code from his project, you would create a folder for each view with the mobile version of the template.
For example your bootstrap desktop version of template.html could look like this:
<div class="container">
<h1 class="text-danger" id="helpHeader">Help Needed?</h1>
<li ng-repeat="help in vm.service.data"> {{ help.title }} - {{ help.content }}</li>
</ul>
<pre dir="ltr">HelpController: {{vm|json}}</pre>
And a ionic mobile version of this same template could be located at mobile/template.html
<ion-view view-title="Help">
<ion-content>
<ion-list>
<ion-item ng-repeat="help in vm.service.data">
{{ help.title }} - {{ help.content }}
</ion-item>
</ion-list>
</ion-content>
You could create a conditional to work with your router to serve the mobile template if you're in a cordova/mobile environment. I feel like maintaining two templates could be development hell. Which is why ionic snubs its nose at developing for the desktop--this is hard work! And prone to bugs. It's pretty much a flytrap ( ya know for bugs :) ).
We could try writing templates with conditionals, but I suspect different files may have less overhead.
A conditional approach to templating:
Test for mobile environment
var isMobile = ionic.Platform.isWebView();
In the template or view html:
<{{isMobile ? 'ion-container' : ' div class="container"'}}>
Or a use an ng-switch:
<div ng-switch="expression">
<div ng-switch-when="isMobile">
CODE FOR MOBILE HERE
</div>
<div ng-switch-default>
CODE FOR DESKTOP HERE
</div>
</div>
Depending on your application, you can get away with using ionic directives for most of your desktop application. You can sprinkle in desktop styling when needed. There's really not a huge amount of code that would actually need to be served by a different mobile/desktop template.

Can you use the Ionic framework to build Mac apps?

The title pretty much says it all. I was asked this question today and really didn't know the answer.
Ionic is not intended to build desktop, or even desktop browser based applications.
From the official docs :
Ionic is focused on building native/hybrid mobile apps rather than
mobile websites.
As such, our browser support tends to be whatever Web View API is
available to native apps on a given platform. For Ionic 1.0.0
"uranium-unicorn", that means UIWebView for iOS 7+, and Android 4.1
and up. Windows Phone and FirefoxOS support is on our roadmap.
Even if you implement a browser website using ionic, the rendered output would rather weird.
Infact, Ionic has itself implemented it's website using bootstrap ;)

What are the drawbacks when using Ionic Framework or OnsenUI only as hosted webapp

We plan to create a hosted web app with AngularJS. As UI Framework we found Ionic and Onsen to work well with AngularJS. Both of this frameworks promote that they are made particularly for Hybrid Apps. But us I understand correctly, both frameworks are based on web technologies. So what are the drawbacks when using the suggested UI frameworks for non Hybrid Apps? Is it mainly the Browser support?
Thanks
Well, both Ionic and Onsen are made particularly for Hybrid Mobile Apps. You just won't be able to use it even for tablet apps without customization (If I am wrong, please correct me) just because they target the limited viewport and incorporate phone UX patterns.
Also, they are made with PhoneGap in mind (the apps will be hosted in the WebView component), and addresses some common WebView problems, e.g GPU acceleration for better performance.
If you need just some UI framework for a simple Web App you'd better have a look at Twitter Boostrap or Zurb Foundation. For a complex case you may even consider Sencha instead of Angular.
There is a part of Ionic that expects the Cordova/PhoneGap Device plugin to be installed. It helps with displaying on Android and iOS appropriately, as well as increasing the size of header bars for iOS 7. That wont be an issue for web though, since you'll have the browser's "chrome" taking up that space.
You may loose some of the buttery smoothness in things like page transitions because the template files need to travel over a (often cellular) connection to the internet, but your app will most certainly work if built with Ionic or Onses over the web.
Things changed considerably over last few months.
Both frameworks now support splitview so they can be used for tablet devices. Subjectively Onsen UI has a better support (it is much more configurable), but Ionic is also not bad. This can translate to smaller desktop browsers screens.
You should also consider that Onsen UI has a dedicated desktop browsers support (all web-kit browsers). Ionic framework will also work on desktop browsers, but it was not fully tested or optimized for such environment.
Biggest problem here is that both frameworks were never meant to be used on larger screens. They look oversized and bloated. If you ever worked with jQuery Mobile (on desktop browsers) you will understand this problem.
There is nothing stopping you from doing that - it might even be a smart approach for a mobile first design approach. The advantage is that you could rapidly iterate an idea an then invest in a native or platform specific app depending on user feedback/metrics.
The main drawback would be the user expectations for your UI and application logic which are different for a web page and a native app. For example the back button will be duplicated in the browser and in your header. You could use some platform specific CSS or configurations to hide it. Then there is your application state and user data - will you save it in local storage, session or database? This depends on your app and best judgement.
There will be some browser issues which may not be addressed in the core of Ionic and Onsen because they are not targeted to work with IE6/7 (see angular browser support), for example, but you can resolve those by having a graded browser support policy.

Debugging VoiceOver application using Angular JS

I have this huge Web Application using Angular JS. This application run in almost every platform and browser configuration like WIn7/IE10, MAC, iPad iOS5,7 and many more.
But this application does not work well when VoiceOver is ON for accessibility and test on iPad iOS 7. The application turn blank on double tap. How to debug this application and anyone who face similar issue can guide, it will be helpful.
Thanks,
Rocky

Resources