AngularJS Routes not working on Windows Phone 8 (using Worklight) - angularjs

I am developing a Hybrid App for iOS,Android,BB and Windows using IBM Worklight.
I am using AngujarJS as the framework along with HTML, CSS and Bootstrap.
As this being a SPA, we are using ngRoute/UI.Route (Need to decide on whether to continue with ngRoute or UI.Route) to route between pages.
While the app works fine on iOS, Android and BB, it does not render anything on Windows Phone 8 Hybrid App. Meaning, it is not able to pick the file when we say
templateUrl : 'views/Login.html'
One blog suggested that we will have to give absolute path in order to make it work like -
templateUrl : 'www/default/views/Login.html'
But this is not the correct solution. Is there any setting that we need to do in order to make it work on windows8 phones.
Thank You in Advance.

I'm not convinced this has to do with AngularJS, but rather to plain JavaScript used in jQuery in conjunction with Windows Phone8, which is notorious to not work well when it comes to web-based multipage apps.
See the following questions for related issues:
Using jquery mobile in IBM Worklight for WIndows Phone 8
IBM Worklight v 5.0.6 - Can't navigate multipages on Windows Phone 7.5 environment
IBM Worklight - $("#pagePort").load() not working in Windows Phone 8
IBM Worklight 6.0 - WL.Client.reloadApp() not working in Windows Phone 8

The problem was the path used.
Take a look at the multi-page sample project provided in the IBM Worklight Getting Started webpage. It contains special handling for WP8 which you may need to apply to your project.
Building a multi-page application training module
Multi-page sample project
Note how the path is handled specifically for Windows Phone 8.
common\main.js:
var path = "";
function wlCommonInit(){
// Special case for Windows Phone 8 only.
if (WL.Client.getEnvironment() == WL.Environment.WINDOWS_PHONE_8) {
path = "/www/default/";
} ... ... }
Conclusion: You need to account for the path for WP8 vs other platforms.

Related

Building a mobille phone app with webview

I am willing to write a very simple mobile phone app (Android and iPhone). It is so generic that it should already exists. Only 2 pages : one for choosing the URL of the server and one with only webview. It already works in a browser. I looked at tools for this purpose (Android studio and Ionics) but they are quite difficult to start with. Any hint to get this done quickly ?
Thanks in advance.
You can do it with a simple ionic app and the in-app-browser plugin:
https://ionicframework.com/docs/angular/your-first-app
https://ionicframework.com/docs/native/in-app-browser

For ionic-angular hybrid app in Windows10 Device(950XL) after latest update(version -10.0.14393.189), selectbox crashing the app

I am creating an Ionic with Angular based hybrid app for Android, iOS & Windows.The app has a functionality select dropdown which was working fine in all three platforms. Once my Windows10 device(950XL) updated to latest version -10.0.14393.189, its crashing the app on tapping on the select box. When I had the old version-10.0.14393.67, the app was working fine. I tested few cordova apps in the same device has the same issue on tapping on dropdown. Kindly help me out to sort this issue.
This seems to be a bug in the WebView control in applications built using the Windows Phone (Universal) target platform and then deployed to a device running Windows 10 Phone. I suggest as a workaround you set Windows target version to 10.0 (in config.xml) and build for Windows-AnyCPU platform. This should run correctly on a Windows 10 phone.
To continue to support Windows 8.1 phone you will need maintain a separate package with Windows Phone (Universal) platform target and Windows 8.1 as target version.

Is Angular JS based hybrid app support windows?

I am working on cordova based cross platform mobile App project which needs to be done using MVC Based framework and able to work on each windows device like windows phones & tablets. So i selected Angular + ionic + cordova.
I tried so many examples to test that windows platform will work with Angular JS or not and every time I install app on windows device, application was crashed each and every time. Those apps are working perfectly on android and ios devices.
I have gone through so many tutorials and blogs for this question, but I didn't find any satisfactory answer. Is there anyway to achieve windows support in angular + ionic?
I tried using "shim" way and also created project through visual studio, but still result is same.
Is there anyone can help me to find answer?
Thanks for help.

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 ;)

SimpleMembershipProvider in mobile app ASP.NET MVC 4

I'm trying to use SimpleMembershipProvider to manage the authentication process of my mobile application.
I generated the project using Mobile template, but this doesn't generated the same files of the Internet application template. It doesn't created the folder Filters with InitializeSimpleMembershipAttribute.cs file and the web.config, AccountController and AccountModel are different.
Can I use SimpleMembershipProvider with mobile applications? If yes, how should I do this? If not, what is the alternative?
You can use the SimpleMembershipProvider in your mobile application. This article provides complete instructions on how to do this and provide links to an example VS project that can be downloaded.

Resources