Position a button in the context cell menu - excel

I have developped an Excel Web addin working correctly. It defines in the xml one menu control for the context cell menu. How is it possible to define a position for this button in the menu?

please check here,https://learn.microsoft.com/en-us/office/dev/add-ins/develop/manifest-element-ordering. As I know, you can only insert to the end of the existing tab as one new group, or totally add one new tab with new group

#RickKirkham `
<Control xsi:type="Menu" id="Autre2" >
<Label resid="Contoso.TaskpaneButton.Label2" />
<Supertip>
<Title resid="Contoso.TaskpaneButton.Label2" />
<Description resid="Contoso.TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Contoso.No$_16x16" />
<bt:Image size="20" resid="Contoso.No$_20x20" />
<bt:Image size="24" resid="Contoso.No$_24x24" />
<bt:Image size="32" resid="Contoso.No$_32x32" />
<bt:Image size="40" resid="Contoso.No$_40x40" />
<bt:Image size="80" resid="Contoso.No$_80x80" />
</Icon>
<Items>
<Item id="actionA">
<Label resid="residLabel5"/>
<Supertip>
<Title resid="residLabel" />
<Description resid="residToolTip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Contoso.couper_16x16" />
<bt:Image size="20" resid="Contoso.couper_20x20" />
<bt:Image size="24" resid="Contoso.couper_24x24" />
<bt:Image size="32" resid="Contoso.couper_32x32" />
<bt:Image size="40" resid="Contoso.couper_40x40" />
<bt:Image size="80" resid="Contoso.couper_80x80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>action5</FunctionName>
</Action>
</Item>
<Item id="ActionB">
<Label resid="residLabel1"/>
<Supertip>
<Title resid="residLabel" />
<Description resid="residToolTip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Contoso.Copier_16x16" />
<bt:Image size="20" resid="Contoso.Copier_20x20" />
<bt:Image size="24" resid="Contoso.Copier_24x24" />
<bt:Image size="32" resid="Contoso.Copier_32x32" />
<bt:Image size="40" resid="Contoso.Copier_40x40" />
<bt:Image size="80" resid="Contoso.Copier_80x80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>action6</FunctionName>
</Action>
</Item>
<Item id="ActionC">
<Label resid="residLabel2"/>
<Supertip>
<Title resid="residLabel" />
<Description resid="residToolTip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Contoso.Coller_16x16" />
<bt:Image size="20" resid="Contoso.Coller_20x20" />
<bt:Image size="24" resid="Contoso.Coller_24x24" />
<bt:Image size="32" resid="Contoso.Coller_32x32" />
<bt:Image size="40" resid="Contoso.Coller_40x40" />
<bt:Image size="80" resid="Contoso.Coller_80x80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>action7</FunctionName>
</Action>
</Item>
<Item id="ActionD">
<Label resid="residLabel4"/>
<Supertip>
<Title resid="residLabel" />
<Description resid="residToolTip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Contoso.Supprimer_16x16" />
<bt:Image size="20" resid="Contoso.Supprimer_20x20" />
<bt:Image size="24" resid="Contoso.Supprimer_24x24" />
<bt:Image size="32" resid="Contoso.Supprimer_32x32" />
<bt:Image size="40" resid="Contoso.Supprimer_40x40" />
<bt:Image size="80" resid="Contoso.Supprimer_80x80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>action8</FunctionName>
</Action>
</Item>
</Items>
</Control>
</OfficeMenu>
</ExtensionPoint>`

Related

MessageComposeCommandSurface doesn't work in 1.1

I want to make an Add-in that :
Is available when Reading an email
Is available when Writing an email
Is Pinnable when Reading an email
So far I've managed to make a Manifest that can achieve 2 out of 3 requirements but not all 3 in the same time.
1+2 is possible with VersionOverrides V1.0 but NOT V1.1
1+3 is possible with VersionOverrides V1.1 but NOT V1.0
Pinning is only possible in 1.1 but then i loose (2)
Any advice ? - other than creating TWO add-ins ?
My sample Manifest.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
<Id>d23964fa-8ebb-4351-a07c-5348c5c88ce4</Id>
<Version>1.0.0.0</Version>
<ProviderName>#Fbsall</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Git the gist" />
<Description DefaultValue="Allows users to access their GitHub gists." />
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png" />
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-80.png" />
<SupportUrl DefaultValue="https://localhost:3000/support.html" />
<AppDomains>
<AppDomain>fbsall.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html" />
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<FunctionFile resid="Commands.Url" />
<!-- Message Compose -->
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgComposeCmdGroup">
<Label resid="GroupLabel" />
<Control xsi:type="Button" id="msgComposeInsertGist">
<Label resid="TaskpaneButton.Label" />
<Supertip>
<Title resid="TaskpaneButton.Title" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url" />
</Action>
</Control>
<Control xsi:type="Button" id="msgComposeInsertDefaultGist">
<Label resid="FunctionButton.Label" />
<Supertip>
<Title resid="FunctionButton.Title" />
<Description resid="FunctionButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>insertDefaultGist</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<FunctionFile resid="Commands.Url" />
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadCmdGroup">
<Label resid="GroupLabel" />
<Control xsi:type="Button" id="msgComposeInsertGist">
<Label resid="TaskpaneButton.Label" />
<Supertip>
<Title resid="TaskpaneButton.Title" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url" />
</Action>
</Control>
<Control xsi:type="Button" id="msgComposeInsertDefaultGist">
<Label resid="FunctionButton.Label" />
<Supertip>
<Title resid="FunctionButton.Title" />
<Description resid="FunctionButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>insertDefaultGist</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png" />
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png" />
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html" />
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GroupLabel" DefaultValue="Git the gist" />
<bt:String id="TaskpaneButton.Label" DefaultValue="Insert gist" />
<bt:String id="TaskpaneButton.Title" DefaultValue="Insert gist" />
<bt:String id="FunctionButton.Label" DefaultValue="Insert default gist" />
<bt:String id="FunctionButton.Title" DefaultValue="Insert default gist" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Displays a list of your gists and allows you to insert their contents into the current message." />
<bt:String id="FunctionButton.Tooltip" DefaultValue="Inserts the content of the gist you mark as default into the current message." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
</VersionOverrides>
I found the answer by looking through a manifest that does exactly what i want.
I had misunderstood how Hosts, Formfactor and ExtensionPoints are declared.
The correct way is something like this:
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<ExtensionPoint xsi:type="MessageComposeCommandSurface"></ExtensionPoint>
<ExtensionPoint xsi:type="MessageReadCommandSurface"></ExtensionPoint>
</DesktopFormFactor>
<MobileFormFactor>
<ExtensionPoint xsi:type="MessageComposeCommandSurface"></ExtensionPoint>
<ExtensionPoint xsi:type="MessageReadCommandSurface"></ExtensionPoint>
</MobileFormFactor>
</Host>
</Hosts>
All content in VersionOverride 1.0 is copied into 1.1.
SupportsPinning is available in 1.1 and works for both Compose and Read.

Register event listener when office addin (Excel) is initialized

I would like register event listener let say listener for event when worksheet changed. But listener should be automatically registered when to office addin is initialized.
I have known that with open of the taskpane you can register the listener but this is not my case. Actually what I tried to do is registered event listener when the function file is loaded and not sure if this is correct way.
I would appreciate any suggestions how can be reached this solution if can be possible.
Here is example of function file.
Html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<!-- Office JavaScript API -->
<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.debug.js"></script>
<script type="text/javascript" src="../function-file.js"></script>
</head>
<body>
<!-- NOTE: The body is empty on purpose. Since function in function-file.js are
invoked via a button, there is no UI to render. -->
</body>
</html>
Typescript file
(() => {
// The initialize function must be run each time a new page is loaded
Office.initialize = () => {
$(document).ready(function () {
registerWorksheetChangedHandler()
/* the rest of your code here */
})
};
// Add any ui-less function here
})();
//Worksheet changed cell events
function registerWorksheetChangedHandler() {
Excel.run(function (context) {
var worksheet = context.workbook.worksheets.getActiveWorksheet()
worksheet.onChanged.add(handleWorksheetChanged);
return context.sync()
.then(function () {
console.log("Event handler successfully registered for onWorksheetChanged event in the worksheet.");
});
}).catch(error => console.log("Error: " + error));
}
function handleWorksheetChanged(event)
{
return Excel.run(function(context){
return context.sync()
.then(function() {
console.log("Change type of event: " + event.changeType);
console.log("Address of event: " + event.address);
console.log("Source of event: " + event.source);
}).catch(error => console.log("Error: " + error));
})
}
Manifest
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="TaskPaneApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>edcf304e-2101-4a0f-8306-7b34608f886a</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>CSSoft a.s.</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="CSSoft Office Addin" />
<Description DefaultValue="CSSoft Office Addin"/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png" />
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-80.png"/>
<!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
<!--<SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]">-->
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<AppDomains>
<AppDomain>AppDomain1</AppDomain>
<AppDomain>AppDomain2</AppDomain>
<AppDomain>AppDomain3</AppDomain>
</AppDomains>
<!--End Basic Settings. -->
<!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
<Hosts>
<Host Name="Workbook" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/index.html" />
</DefaultSettings>
<!-- End TaskPane Mode integration. -->
<Permissions>ReadWriteDocument</Permissions>
<!-- Begin Add-in Commands Mode integration. -->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<!-- The Hosts node is required. -->
<Hosts>
<!-- Each host can have a different set of commands. -->
<!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
<!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
<Host xsi:type="Workbook">
<!-- Form factor. Currently only DesktopFormFactor is supported. -->
<DesktopFormFactor>
<!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
<GetStarted>
<!-- Title of the Getting Started callout. resid points to a ShortString resource -->
<Title resid="CSSoft.GetStarted.Title"/>
<!-- Description of the Getting Started callout. resid points to a LongString resource -->
<Description resid="CSSoft.GetStarted.Description"/>
<!-- Point to a url resource which details how the add-in should be used. -->
<LearnMoreUrl resid="CSSoft.GetStarted.LearnMoreUrl"/>
</GetStarted>
<!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
Think of the FunctionFile as the code behind ExecuteFunction. -->
<FunctionFile resid="CSSoft.DesktopFunctionFile.Url" />
<!-- PrimaryCommandSurface is the main Office Ribbon. -->
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
<!-- <OfficeTab id="TabHome"> -->
<CustomTab id="CSSoft.CustomTab">
<!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
<Group id="CSSoft.Group">
<!-- Label for your group. resid must point to a ShortString resource. -->
<Label resid="CSSoft.GroupLabel" />
<!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
<!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
<Icon>
<bt:Image size="16" resid="CSSoft.tpicon_16x16" />
<bt:Image size="32" resid="CSSoft.tpicon_32x32" />
<bt:Image size="80" resid="CSSoft.tpicon_80x80" />
</Icon>
<!-- Menu example -->
<Control xsi:type="Button" id="CSSoft.Menu">
<Label resid="CSSoft.Menu.Label" />
<Tooltip resid="CSSoft.Menu.Tooltip" />
<Supertip>
<Title resid="CSSoft.Menu.Label" />
<Description resid="CSSoft.Menu.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="CSSoft.menu_16x16" />
<bt:Image size="32" resid="CSSoft.menu_32x32" />
<bt:Image size="80" resid="CSSoft.menu_80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>CSSoftMenuTaskPaneID</TaskpaneId>
<SourceLocation resid="CSSoft.Taskpane.Url" />
</Action>
</Control>
</Group>
<!--</OfficeTab>-->
<Label resid="CSSoft.CustomTab.Label" />
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<!-- You can use resources across hosts and form factors. -->
<Resources>
<bt:Images>
<bt:Image id="CSSoft.tpicon_16x16" DefaultValue="https://localhost:3000/assets/icon-16.png" />
<bt:Image id="CSSoft.tpicon_32x32" DefaultValue="https://localhost:3000/assets/icon-32.png" />
<bt:Image id="CSSoft.tpicon_80x80" DefaultValue="https://localhost:3000/assets/icon-80.png" />
<bt:Image id="CSSoft.menu_16x16" DefaultValue="https://localhost:3000/assets/menu_16x16.png" />
<bt:Image id="CSSoft.menu_32x32" DefaultValue="https://localhost:3000/assets/menu_32x32.png" />
<bt:Image id="CSSoft.menu_80x80" DefaultValue="https://localhost:3000/assets/menu_80x80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="CSSoft.Taskpane.Url" DefaultValue="https://localhost:3000/index.html" />
<bt:Url id="CSSoft.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
<bt:Url id="CSSoft.DesktopFunctionFile.Url" DefaultValue="https://localhost:3000/function-file/function-file.html" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="CSSoft.TaskpaneButton.Label" DefaultValue="Show Taskpane" />
<bt:String id="CSSoft.GroupLabel" DefaultValue="Menu" />
<bt:String id="CSSoft.GetStarted.Title" DefaultValue="Get started with your sample add-in!" />
<bt:String id="CSSoft.CustomTab.Label" DefaultValue="CSSoft"/>
<bt:String id="CSSoft.Menu.Label" DefaultValue="Go Menu"/>
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="CSSoft.TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
<bt:String id="CSSoft.GetStarted.Description" DefaultValue="CSSoft add-in loaded succesfully. Go to the CSSoft tab and click the 'Go Menu' button to get started." />
<bt:String id="CSSoft.Menu.Tooltip" DefaultValue="Access into the main menu" />
</bt:LongStrings>
</Resources>
</VersionOverrides>
<!-- End Add-in Commands Mode integration. -->
</OfficeApp>

Data is not fetching from API in IONIC app in android device, Chrome it works fine

I am new to ionic framework. I am working on project using ionic 1, I have created side menu app.
In this am fetching play list data from database when playlists controller loads, I am using nodejs and Mongodb as backend. In chrome(IONIC Serve) it is fetching data from db but when I run into android device(ionic cordova run android) it is not loading API.
I am unable to find what went wrong, I have referred stackoverflow and many article but couldn't.
I have seen many of them facing this issue, I had tried what they are telling to do but no luck.
Please help me to find the error.
App.js
var wowzer = angular.module('wowzer', ['ionic'])
wowzer.config(function($stateProvider, $urlRouterProvider, $locationProvider) {
$stateProvider
.state('login', {
url: '/',
templateUrl: 'templates/login.html',
controller: 'AppCtrl'
})
.state('app', {
url: '/app',
abstract: true,
templateUrl: 'templates/menu.html',
controller: 'AppCtrl'
})
.state('app.search', {
url: '/search',
views: {
'menuContent': {
templateUrl: 'templates/search.html'
}
}
})
.state('app.browse', {
url: '/browse',
views: {
'menuContent': {
templateUrl: 'templates/browse.html'
}
}
})
.state('app.playlists', {
url: '/playlists',
views: {
'menuContent': {
templateUrl: 'templates/playlists.html',
controller: 'PlaylistsCtrl'
}
}
})
.state('app.single', {
url: '/playlists/:playlistId',
views: {
'menuContent': {
templateUrl: 'templates/playlist.html'
}
}
});
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/');
});
wowzer.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}
});
})
Index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' yourhost.com ws://localhost:35729; style-src 'self' 'unsafe-inline'; media-src *;script-src 'self' localhost:35729 'unsafe-eval' 'unsafe-inline';">
<title></title>
<link rel="manifest" href="manifest.json">
<!-- un-comment this code to enable service worker
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.log('Error', err));
}
</script>-->
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/logInControllers.js"></script>
<script src="js/playListController.js"></script>
<script src="services/logInServices.js"></script>
</head>
<body ng-app="wowzer">
<ion-nav-view></ion-nav-view>
</body>
</html>
playlistController
wowzer.controller('PlaylistsCtrl', function($scope, logInServices) {
logInServices.fetchAllItem().then(function(response) {
console.log(response.data);
$scope.playlists = response.data;
});
})
.services.js
wowzer.factory('logInServices', function($http) {
userFactory = {};
//User.create(regData);
userFactory.fetchAllItem = function() {
return $http.get('http://localhost:8100/api/fetchdata');
}
return userFactory;
})
AndroidManifest.xml
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="io.ionic.wowzer" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application android:hardwareAccelerated="true" android:icon="#mipmap/icon" android:label="#string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="#string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="#android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="#string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" />
</manifest>
config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.wowzer" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>WOWZER</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi#ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
<access origin="*" />
<allow-navigation href="http://ionic.local/*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="ShowSplashScreenSpinner" value="false" />
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/icon#2x.png" width="114" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/icon-40#2x.png" width="80" />
<icon height="120" src="resources/ios/icon/icon-40#3x.png" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/icon-50#2x.png" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/icon-60#2x.png" width="120" />
<icon height="180" src="resources/ios/icon/icon-60#3x.png" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/icon-72#2x.png" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/icon-76#2x.png" width="152" />
<icon height="167" src="resources/ios/icon/icon-83.5#2x.png" width="167" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small#2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small#3x.png" width="87" />
<splash height="1136" src="resources/ios/splash/Default-568h#2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape#2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape#~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait#2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait#~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default#2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
</platform>
<engine name="android" spec="^6.2.3" />
<plugin name="cordova-plugin-console" spec="^1.0.5" />
<plugin name="cordova-plugin-device" spec="^1.1.4" />
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="cordova-plugin-statusbar" spec="^2.2.1" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
</widget>
Plalist API
module.exports = function(router) {
router.get('/fetchdata', function(req, res) {
var playlists = [
{ title: 'Reggae', id: 1 },
{ title: 'Chill', id: 2 },
{ title: 'Dubstep', id: 3 },
{ title: 'Indie', id: 4 },
{ title: 'Rap', id: 5 },
{ title: 'Cowbell', id: 6 }
];
console.log(playlists);
res.json(playlists);
});
return router;
}
Please help me where I did wrong.
Thanks in advance...
Run with below command, get the console logs.Then you will get an issue it's easy to solve.
ionic run android -l -c -s
-l stands for livereload
-c stands for consolelogs
-s stands for serverlogs
After using the livereload, I didn't face this issue.Try with it.
the problem is due to the fact that by default ionic does not allow http connections .... so to overcome this problem, add to the AndroidManifest.xml file located in /android/app/src/main as follows (sa marche chez moi)
```
<application
android:usesCleartextTraffic="true"
>
```
```
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
```
enter image description here
enter image description here

PhoneGap build. Why isn't my config.xml information showing with my build? No errors

I uploaded a zipped folder with my config.xml file in the root. I don't get any build errors. After the build it doesn't show any plugins, any icons, any information in my config.xml file whatsoever. The only notification I get is "This app isn't using the latest version of PhoneGap. We recommend upgrading to 3.7.0." — in fact, it shows PhoneGap Build 3.3.0.
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.parker.products.2015"
versionCode="1"
version = "0.0.1">
<name>Products</name>
<description>Easily view Parker Aerospace products and component information on iOS devices for reference or convenient use with customers and industry colleagues.</description>
<gap:platform name="ios" />
<preference name="phonegap-version" value="3.7.0" />
<preference name="orientation" value="default" />
<preference name="fullscreen" value="false" />
<preference name="webviewbounce" value="false" />
<preference name="DisallowOverscroll" value="true"/>
<preference name="disallowOverscroll" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="prerendered-icon" value="true" />
<icon src="res/icon/ios/icon-57.png" gap:platform="ios" width="57" height="57" />
<icon src="res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="res/icon/ios/icon-57-2x.png" gap:platform="ios" width="114" height="114" />
<icon src="res/icon/ios/icon-72-2x.png" gap:platform="ios" width="144" height="144" />
<icon src="res/icon/ios/icon-76.png" gap:platform="ios" width="76" height="76" />
<icon src="res/icon/ios/icon-120.png" gap:platform="ios" width="120" height="120" />
<icon src="res/icon/ios/icon-152.png" gap:platform="ios" width="152" height="152" />
<gap:splash src="res/screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="res/screen/ios/screen-iphone-landscape.png" gap:platform="ios" width="480" height="320" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="res/screen/ios/screen-iphone-landscape-2x.png" gap:platform="ios" width="960" height="640" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<gap:splash src="res/screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024 " />
<gap:splash src="res/screen/ios/screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" />
<gap:splash src="res/screen/ios/screen-ipad-portrait-2x.png" gap:platform="ios" width="1536" height="2008" />
<gap:splash src="res/screen/ios/screen-ipad-landscape-2x.png" gap:platform="ios" width="2048" height="1496" />
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/network"/>
<gap:plugin name="org.apache.cordova.dialogs" />
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="de.appplant.cordova.plugin.email-composer" />
<gap:plugin name="org.apache.cordova.network-information" />
<gap:plugin name="org.apache.cordova.inappbrowser" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<gap:plugin name="com.phonegap.plugin.statusbar" />
</widget>
I've been trying to figure this out for days. Any ideas?
#Lisa, sometimes when the compiler fails, it drops references after that. Try removing all your plugins and add them back one at a time. It is tedious, but I found one bug like that. NOTE: It might be easier to start with a blank App, then to use the one you've put hours into.
FWIW: I do every plugin in a simple App, then add it to my main App. This allows me to test that plugin for bugs, then when I find them (bugs) I do less backtracking. It works sometimes. --Jesse

Ext Net TimeField in an editable grid

I have a grid panel which display two TimeSpans in two columns and all is well when I load the page but when I go server side the validation on my editors always fail. I don't understand why the store can display the TimeSpans but cannot return it after...
Here my code :
<ext:GridPanel ID="WeekParams" runat="server" >
<Store>
<ext:Store runat="server">
<Reader>
<ext:JsonReader IDProperty="GUID">
<Fields>
<ext:RecordField Name="Day" Type="String" />
<ext:RecordField Name="UATNumber" Type="int" />
<ext:RecordField Name="From" Type="Date" />
<ext:RecordField Name="To" Type="Date" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ColumnID="Day" DataIndex="Day" />
<ext:NumberColumn ColumnID="UATNumber" DataIndex="UATNumber" Format="0" />
<ext:DateColumn ColumnID="From" DataIndex="From" Format="dd/MM/yyyy" >
<Renderer Format="Date" FormatArgs="'HH:mm'" />
<Editor>
<ext:TimeField runat="server" />
</Editor>
</ext:DateColumn>
<ext:DateColumn ColumnID="To" DataIndex="To" Format="dd/MM/yyyy" >
<Renderer Format="Date" FormatArgs="'HH:mm'" />
<Editor>
<ext:TimeField runat="server" />
</Editor>
</ext:DateColumn>
</Columns>
</ColumnModel>
<Plugins>
<ext:EditableGrid runat="server" />
</Plugins>
</ext:GridPanel>
And here the result when I'm going to the server side :

Resources