Ionic Sidemenu starter - Windows 8.1


The Ionic Side menu starter template for windows 8.1 is a very good option to run the ionic apps on Windows 8.1 phones.

I am not sure whether this is related to Ionic/angular or VS2013 CTP 3.1 but if anyone can give some tips ,that would be great. I registered a background task as per the VS tutorial (Run JS task in background) and i tested it with windows toast notifications.However my requirement is to access webservice in background which I am not able to implement.

The setup for background task is path to the js file but my requirement is to call a function defined within a controller.Is there any way i can access the controller function from an outside js file.I am new to Ionic,Angular and VS 2013.

The structure of background task js file is as below

(function() {

— I need to call my controller/service function here—
var notifications = Windows.UI.Notifications;

var template = notifications.ToastTemplateType.toastImageAndText01;
var toastXml = notifications.ToastNotificationManager.getTemplateContent(template);
var toast = new notifications.ToastNotification(toastXml);
var toastTextElements = toastXml.getElementsByTagName("text");
toastTextElements[0].appendChild(toastXml.createTextNode("From Background!"));
var toastNotifier = notifications.ToastNotificationManager.createToastNotifier();;