Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70857 articles
Browse latest View live

How to: Ionic2 with Javascript

$
0
0

@MisterDev wrote:

Today I've learned that ionic 2 now uses typescript only. I've also found here:

We're going all in on TS.
You could do your own work and covert it toa es6 workflow, but we want people to use typescript

For many reasons I would like to use Javascript, how can I do that?

Also, which is the reason of no more .js?

Thanks in advance! :slight_smile:

Posts: 4

Participants: 3

Read full topic


Upload video file to firebase storage

$
0
0

@eheading wrote:

I have followed this video : https://www.youtube.com/watch?v=6yGrLWq-oIo
and I can successfully pick the image from library from changeing sourceType: Camera.PictureSourceType.CAMERA to Camera.PictureSourceType.PHOTOLIBRARY of the cordova plugin-camera.

Instead of uploading images, may I know how to choose video files and upload to firebase for ionic2?

Many thanks.

Posts: 1

Participants: 1

Read full topic

How to use on-swipe and side-menu at the same time?

$
0
0

@SE_Flyer wrote:

I want to be able to use swipe-right to get to last page,and use a right side menu in the current page.
But it seems that they can't work well together,how to fix it?

Posts: 1

Participants: 1

Read full topic

Push Notifications with ionic cloud

$
0
0

@Eon wrote:

Hello,

I just upload my app to the app store and play store, the push notifications are working fine in android but in ios doesn't work, i tested the push in develop when i run my app from xCode and everything was fine, but now when i download the app from the store the notifications doesn't work, and i don't know why.

i use apps.ionic.io to send the push and ionic/cloud-angular@0.0.12.

The code in my app.ts is this:

 var push= new Push({
      pluginConfig: {
        android: {
      senderID: "xxxxxxxxxxx"
        },
        ios: {
      alert: "true",
      badge: false,
      sound: "true"
    }
      }
      })

    push.register((token) => {
    push.saveToken(token);
  });

Thanks!

Posts: 1

Participants: 1

Read full topic

Ionic Deploy: Disabled! Deploy plugin is not installed or has not loaded. Have you run `ionic plugin add ionic-plugin-deploy` yet?

$
0
0

@vijayboyapati wrote:

Hi guys, I'm trying to get Ionic deploy working and I've followed the setup instructions here:

http://docs.ionic.io/services/deploy/

I have an app_id and I believe I've successfully installed all the plugins, plus I've included ionic.cloud.min.js etc

However, when I run ionic serve, I get the messages "Ionic Deploy: Disabled! Deploy plugin is not installed or has not loaded. Have you run ionic plugin add ionic-plugin-deploy yet?

When I run that command it tells me that I already have ionic plugin installed for android and ios.

Does deploy only work when run in the context of run android (or ios) and not ionic serve? When I deploy the app (which previously worked without the deploy code in the tutorial) it crashes after a few seconds.

I've been searching for solutions to this and found pages like this:

but it's not clear whether they're deprecated or not. At least, I haven't been able to find a solution that has solved this issue and allowed me to get a "hello world" of deploy working.

Thanks for your help!

Posts: 1

Participants: 1

Read full topic

Click not work proper in select menu

$
0
0

@varshil29 wrote:

i have one select/option menu with label.. problem is that when i add css at that time menu open on arrow click not on whole row click. and when i remove css .click on any place in whole row open menu. why it happened??
code that i used.
if i write like that ..not clik in whole row only arrow click available.

    <ion-label class="text-center">Connection Detail</ion-label>
     <ion-item>
        <ion-label>Box Type</ion-label>
        <ion-select [formControl]="dthactivationForm.controls.boxControl" (ionChange)="detailSelected()">
        <ion-option *ngFor="let item of boxArray" value="{{item.id}}" >{{item.text}}</ion-option>
        </ion-select>
     </ion-item>

css file

    .text-center{
    	font-size: 110%;
    	text-align: center;
    	background-color: #a1c1da;
    }
    button
    {
      	margin-top: 10%;
    }

if i write below code than i able to click any where in row

    <ion-label>Connection Detail</ion-label>
     <ion-item>
        <ion-label>Box Type</ion-label>
        <ion-select [formControl]="dthactivationForm.controls.boxControl" (ionChange)="detailSelected()">
        <ion-option *ngFor="let item of boxArray" value="{{item.id}}" >{{item.text}}</ion-option>
        </ion-select>
     </ion-item>

nothing in css file

Posts: 2

Participants: 2

Read full topic

Will ionic 1 still be supported after ionic 2 is released?

$
0
0

@GregDev wrote:

Hey everyone,

We've been using ionic for over a year now and really like it! After ionic 2 is released will ionic 1 still be supported? This would be useful for us to know because if this is not the case we want to start the migration process as soon as possible.

Posts: 3

Participants: 3

Read full topic

Refresh app on specific hour

$
0
0

@codiqa100098546 wrote:

Hello,

I have created an application and have one problem. How can I refresh data/cache on specific hour? For example on 2 am app will download data.

How can I do something like this?
Thanks, Bartek.

Posts: 3

Participants: 2

Read full topic


Ionic 2 Failed to push to another page from Forms in Modal

$
0
0

@vinnchan wrote:

<form [formGroup]="variation" (ngSubmit)="onSubmit()">
  <ion-list radio-group formControlName="color" *ngFor="let option of options">
  <ion-list-header>
    {{option.name}}
  </ion-list-header>

  <ion-item *ngFor="let opt of option.options">
    <ion-label>{{opt}}</ion-label>
    <ion-radio value="{{opt}}"></ion-radio>
    <!--<ion-input type="text" formControlName="color" name="color" value=""></ion-input>-->
  </ion-item>
</ion-list>
<button class="custom-button" block (click)="goToCart()">Submit</button>
</form>

Above is my forms in modal
I failed to push to another page from Forms in Modal after I clicked submit button.
Below is my push to another page method

goToCart() {
    this.nav.setRoot(CartPage);
  }

Below picture is after I clicked submit button in the form, the modal only slided half

Posts: 2

Participants: 2

Read full topic

Google Maps: the best plugin is?

$
0
0

@ziobudda wrote:

Hi all, I have searched via Google for a Google Maps plugin but I have found to much docs and plugins.
Which is the most advanced and/or the better at this moment ?

I don't want start a flame.

Thanks.

Posts: 1

Participants: 1

Read full topic

Collection-repeat item not working with angular component

$
0
0

@MisterDev wrote:

I'm trying to use collection-repeat to display an angular component for each object in an array. I pass each object as parameter to an angular component but when I try to access the object in my component's controller I get undefined.

<ion-content>
   <ion-list>
     <ion-item
   	collection-repeat="user in users"
   	item-width="100%"
  	item-height="90px">
        {{user}} //renders my user data correctly instantly
	<usser user="user"></user>
    </ion-item>
  </ion-list>
</ion-content>

My component

angular
    .module('app')
    .component('user', {
    	templateUrl: 'components/user.html',
        scope: true,
    	bindings: {
    	    user: '<'
    	},
    	controller: function() {
	    console.log(self.user)  //prints undefined
    	}
    })
  • I've tried wrapping the console.log in a $timeout without success
  • Printing self displays {user: undefined} in my chrome console, but if I expand the object I can see that user contains the correct data (only for the some of the items)
  • Accessing self.user doesn't work

EDIT: I can't really understand what's going on..

controller: function() {
    console.log(self.user)  //prints undefined
    setTimeout(function() {
        console.log(self.user) // prints my data
    }, 2000)
}

What am I doing wrong?

Thanks in advance! :slight_smile: (:sob: :rage:)

Posts: 1

Participants: 1

Read full topic

[cordova-debug-adapter] Error: Unable to find pid

$
0
0

@sahildaga95 wrote:

Hello,
I am developing my app using ionic and i wanted to debug my application on Mobile device not emulator.It works perfectly in Windows but do not launch on ubuntu or macintosh.
I also have usb debugging enabled on device,as i said works perfect in Windows.
This is my ionic info
Cordova CLI: 6.3.1
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
OS: Distributor ID: Ubuntu Description: Ubuntu 16.04 LTS
Node Version: v6.4.0

This is my launch.json,

    {
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Run Android on device",
            "type": "cordova",
            "request": "launch",
            "platform": "android",
            "target": "device",
            "port": 9222,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}",
            "ionicLiveReload": false
        },
        {
            "name": "Run iOS on device",
            "type": "cordova",
            "request": "launch",
            "platform": "ios",
            "target": "device",
            "port": 9220,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}",
            "ionicLiveReload": false
        },
        {
            "name": "Attach to running android on device",
            "type": "cordova",
            "request": "attach",
            "platform": "android",
            "target": "device",
            "port": 9222,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}"
        },
        {
            "name": "Attach to running iOS on device",
            "type": "cordova",
            "request": "attach",
            "platform": "ios",
            "target": "device",
            "port": 9220,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}"
        },
        {
            "name": "Run Android on emulator",
            "type": "cordova",
            "request": "launch",
            "platform": "android",
            "target": "emulator",
            "port": 9222,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}",
            "ionicLiveReload": false
        },
        {
            "name": "Run iOS on simulator",
            "type": "cordova",
            "request": "launch",
            "platform": "ios",
            "target": "emulator",
            "port": 9220,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}",
            "ionicLiveReload": false
        },
        {
            "name": "Attach to running android on emulator",
            "type": "cordova",
            "request": "attach",
            "platform": "android",
            "target": "emulator",
            "port": 9222,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}"
        },
        {
            "name": "Attach to running iOS on simulator",
            "type": "cordova",
            "request": "attach",
            "platform": "ios",
            "target": "emulator",
            "port": 9220,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}"
        },
        {
            "name": "Serve to the browser (ionic serve)",
            "type": "cordova",
            "request": "launch",
            "platform": "serve",
            "cwd": "${workspaceRoot}",
            "devServerAddress": "localhost",
            "sourceMaps": true,
            "ionicLiveReload": true
        },
        {
            "name": "Simulate Android in browser",
            "type": "cordova",
            "request": "launch",
            "platform": "android",
            "target": "chrome",
            "simulatePort": 8000,
            "livereload": true,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}"
        },
        {
            "name": "Simulate iOS in browser",
            "type": "cordova",
            "request": "launch",
            "platform": "ios",
            "target": "chrome",
            "simulatePort": 8000,
            "livereload": true,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}"
        }
    ]
}

Posts: 2

Participants: 2

Read full topic

How to add the Windows platform in a project using Linux?

$
0
0

@leonardovilarinho wrote:

Is there any way to add the Windows platform in a project?

I'm using Ubuntu Linux, I have had no problems when adding the Android platform with Windows not getting success is displayed this error:

Adding windows project.

Error: spawn EACCES
at exports. _ errnoException (util.js: 907:11)
at ChildProcess. spawn (internal/child_process.js: 298:11)
at Object. exports. spawn (child_process.js: 362:9)
at Object. exports. spawn (/usr/share/cordova-cli/node_modules/cordova-lib/src/cordova/superspawn.js: 100:31)
at/usr/share/cordova-cli/node_modules/cordova-lib/src/cordova/platform.js: 151:39
at _ fulfilled (/usr/share/cordova-cli/node_modules/q/q.js: 787:54)
at self. promiseDispatch. done (/usr/share/cordova-cli/node_modules/q/q.js: 816:30)
at Promise .promise. promiseDispatch (/usr/share/cordova-cli/node_modules/q/q.js: 749:13)
at/usr/share/cordova-cli/node_modules/q/q.js: 509:49
at flush (/usr/share/cordova-cli/node_modules/q/q.js: 108:17)

With iOS also got success with Windows that do not. There is another way, how to export the project and compile the Intel XDK or something?

Posts: 2

Participants: 2

Read full topic

ERROR installing ionic app on android device

How to create push notification in ionic 2

$
0
0

@sagi_uziel wrote:

Hi,
I need a good guide to install ionic 2 push notification in android.

I tried this link (http://docs.ionic.io/services/push) and it doesnt work.

Thanks

Posts: 3

Participants: 2

Read full topic


IOS Google Maps

$
0
0

@hermanho237 wrote:

Hello, have trouble with maps on IOS. my app works fin on ANDROID, but on IOS i always have a timeout error from google API. I set timeout to 1000. Any special settings for IOS?

Posts: 1

Participants: 1

Read full topic

Getting $ionicTabsDelegate To Display Tabs Bar

$
0
0

@angelalukic wrote:

I've also asked about this on StackOverflow and GitHub but I don't seem to be getting much luck.

I've currently got an Ionic App which has both a sidemenu and a tabs bar. I'm trying to get it so the tabs bar will display on sidemenu pages which are not children of the tabs bar. The only page which is a child of both is the dashboard. Currently the tabs bar disappears if I access a side menu page that isn't dashboard.

From browsing the Ionic forums I learned of a method which seems to be on the right tracks but it doesn't seem to be working.

Reference: http://ionicframework.com/docs/api/service/$ionicTabsDelegate/

index.html

<ion-content class="side-menu-left" ng-controller="AppCtrl">
  <ion-list <!--Irrelevant Stuff Here-->>
    <ion-item ui-sref="aboutUs" <!--Irrelevant Stuff Here--> ng-click="showTabs()" menu-close>
      <i class="icon ion-information-circled"></i>About Us</ion-item>

  <!-- More Side Menu Items Here etc. -->

controllers.js

.controller('AppCtrl', function($scope, $ionicTabsDelegate) {

    $scope.showTabs = function() {
        $ionicTabsDelegate.showBar(true);
    };
});

I have also tried $ionicTabsDelegate.$getByHandle('tabsController').showBar(true); but this doesn't work either. I can access the page fine but the tabs bar still does not appear.

Here are some other bits of my code if it helps understanding in any way:

aboutUs.html

<ion-view style="" class=" " id="page10" title="About Us">
    <ion-content class="has-header" padding="true"><!--Content Here--></ion-content>
</ion-view>

routes.js

.config(function($stateProvider, $urlRouterProvider) {
$stateProvider

.state('tabsController', {
    url: '/page1',
    templateUrl: 'templates/tabsController.html',
    abstract:true
  })

.state('tabsController.dashboard', {
    url: '/dashboard',
    views: {
      'tab1': {
        templateUrl: 'templates/dashboard.html',
        controller: 'dashboardCtrl'
      }
    }
  })

// Other controllers for tabs pages here

.state('aboutUs', {
    url: '/aboutUs',
    templateUrl: 'templates/aboutUs.html',
    controller: 'aboutUsCtrl'
  })

// Other controllers for sidemenu pages here

$urlRouterProvider.otherwise('/page1/dashboard')

});

Posts: 1

Participants: 1

Read full topic

It does not work.....?

Error with navigator object

$
0
0

@drako9 wrote:

Hi all , i'm new in ionic forum and i decide to create this topic to solve a problem with i'm stuck for 2 weeks.

I have the following :
- Visual Studio Android Emulator
- Ionic 1 project created with the tabs pattern.

I'm trying to use the ngCordova contacts module ( $cordovaContacts ) to retrieve the phone numbers of the contacts. The problem is that there is an error with the "navigator" object. I found that there is not possible to acces the fields of these object ( functions , app , contacts , splashscreen ) so when i call to $cordovaContacts.find(...) it shows the error : "Can not find property find of undefined" . I invested some time debugging and when i use :
console.log(navigator);
The console shows:
[object Object]
services.js (21,15)
CordovaNavigator
_ {_
_ [functions]: ,_
_ proto: { },_
_ app: { },_
_ contacts: { },_
_ splashscreen: { }_
_ }_

But when i print navigator.contacts object it shows undefined

I also tried to use navigator.CordovaNavigator but is also undefined.

This code is called when loading controllers.

I have no idea why it shows that navigator has an atribute contacts and then when i call it it shows UNDEFINED . Maybe i need to stablish some acces rights ??.

I'm really lost so anything you tell me will help. Thanks a lot.

Posts: 1

Participants: 1

Read full topic

Material design compatibility with css

$
0
0

@rohitrai wrote:

Hi all, I'm building hybrid app using ionic framework can you suggest me which material design i should opt for example Materialize, angular etc there is also polymer by google is it supported with ionic. it would be appreciated if you help me with this query.

Posts: 2

Participants: 2

Read full topic

Viewing all 70857 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>