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

WebSocket in Ionic 2

$
0
0

@arnhrwd wrote:

There seems to be a lot of confusing discussion about using websocket in ionic apps, and very little if anything I can find concerning ionic 2 apps. I really need a websocket api for my ionic 2 app; that will work at lest on the browser platform plus android platform. Any suggestions?

Posts: 2

Participants: 2

Read full topic


Header disappear on controller reload

$
0
0

@umefarooq wrote:

Hi
i am checking internet connection in my app controller, it working fine show popup message if app is offline, when i reload the same controller header disappear, i have tried these lines of code after googling

// $state.reload();
 $state.transitionTo($state.current, {}, { reload: true, inherit: true, notify: true });
// $state.transitionTo($state.current, {}, { reload: true, inherit: false, notify: true });
// $state.go($state.current, {}, {reload: true});

is there any better way to reload controller where header stays same,

Posts: 1

Participants: 1

Read full topic

NgModule not found in ionic 2 app?

$
0
0

@mtycholaz wrote:

This part is confusing, and I only figured out through trial and error. Being a newbie to Typescript, Ionic 2, and Angular 2, I've been doing a lot of reading. What I've found in the Angular 2 docs is that you should be creating modules for features of your code. The Angular docs recommend that you bootstrap a root module that contains everything for your project.

Naturally, I tried this with Ionic2, but quickly ran into errors with providers, among other things. Turns out that I need to set all my providers on a root component for it to work in Ionic2.

At first when I was doing this import { NgModule } from '@angular/core' I would get an error that NgModule was not present. I ignored it, thinking that it was Visual Studio intellisense error. Only after many hours of debugging, reading, and trial and error I have come to the conclusion that Ionic 2 includes a version of Angular 2 that doesn't have NgModules (unless their hidden somewhere else).

Not sure why this isn't mentioned in the Ionic 2 documentation. Seems important enough to me. Probably save someone else a lot of pain too.

Anyone have any explanation for this?

Posts: 1

Participants: 1

Read full topic

Ionic push notification not working (By youtube guid)

$
0
0

@sagi_uziel wrote:

I tried to create ionic push notifications in my app by this tutorial:

and I got this errors:

[09:19:34] Finished 'sass' after 1.47 s
TypeScript error: app/app.ts(16,5): Error TS2322: Type '{ 'core': { 'app_id': string; 'gcm_key': string; }; }' is not assignable to type 'CloudSettings'.
Types of property 'core' are incompatible.
Type '{ 'app_id': string; 'gcm_key': string; }' is not assignable to type 'CoreSettings'.
Object literal may only specify known properties, and ''gcm_key'' does not exist in type 'CoreSettings'.
TypeScript error: app/app.ts(38,27): Error TS2345: Argument of type '{ pluginConfig: { android: { senderID: string; }; }; }' is not assignable to parameter of type 'PushDependencies'.
Object literal may only specify known properties, and 'pluginConfig' does not exist in type 'PushDependencies'.
[09:19:39] Finished 'watch' after 6.44 s
[09:19:39] Starting 'serve:before'...
[09:19:39] Finished 'serve:before' after 9.4 μs

Does anyone have an idea what's wrong? Does anyone have a guide that explains how to activate this plugin?

Posts: 1

Participants: 1

Read full topic

Anyone know about facebook bot?

Nav.push right

$
0
0

@poonsak58 wrote:

navbar is right side. i want to left side.
How to fix it?

<ion-header>
  <ion-navbar dark>
    <ion-title style="color:white;">Hansa Wave</ion-title>
  </ion-navbar>
</ion-header>

Posts: 1

Participants: 1

Read full topic

Ionic View Error - Android Back Button breaks Modals

$
0
0

@SubEffect wrote:

Using Ionic View the Android Back Button does not close Modals and breaks them.

I cannot close a modal with it's own close button after pressing the Back button.

This doesn't seem to be the case with the apk I create using "ionic run android".

Has anyone else found this?

Posts: 1

Participants: 1

Read full topic

Angularjs custom filter crashes

$
0
0

@amrayoub wrote:

i'm trying to filtering the data json by id , it works great with the id , but when i put the model , it doesn't' work.

<ion-content ng-repeat="model in models | filter: { id: 9 }:true" >


 .controller('BasintekModelsController',['$scope','$http', '$state',
function($scope, $http, $state) {
    $http.get('js/data.json').success(function(data){
        $scope.models =  data;
        $scope.whichmodel = $state.params.modelId;
        //$scope.toggleStar = function(model){
        //    model.star = !model.star;
        //}
    });

but when i add the whichmodel

    <ion-content ng-repeat="model in models | filter: { id: whichmodel}:true" >

the app crashes , here's a screen shot

Any help, please

Posts: 1

Participants: 1

Read full topic


Ionic Serve no longer working

$
0
0

@charlestupman wrote:

I built my project in IOS and Android and since then Ionic Serve has stopped working. If I try the command I get this error:

Error opening the browser -  TypeError: s.replace is not a function
at escape (/usr/local/lib/node_modules/ionic/node_modules/open/lib/open.js:62:12)
at open (/usr/local/lib/node_modules/ionic/node_modules/open/lib/open.js:31:30)
at Object.openBrowser (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/serve.js:240:7)
at /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/serve.js:510:15
at _fulfilled (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/ionic/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)

I have tried deleting the:

"defaultBrowser": true

line from the ionic.config.json file as recommended on another forum but it just seems to add it back when i try and serve, if it does work (which it does occasionally if I remove this line) I get some weird behaviour in that the version served is always Android native and no matter what I am unable to serve the IOS version. As a work around I am using Ionic Labs which still works fine however it is not ideal. A side effect to the issue is that now all of the .ts files within my app directory have been been compiles into seperate js files. While this does not affect the application itself it is extremely annoying. Any help would be greatly appreciated.

Posts: 1

Participants: 1

Read full topic

Refused to set unsafe header “Cookie" error

$
0
0

@baadier wrote:

I’m trying to make a get request to a API that requires a cookie.

I get a Refused to set unsafe header “Cookie" error

I’m using the Chrome extension for CORS and dont own the API

headers.append(‘Cookie’,’Cookie value’);

let options = new RequestOptions({
     headers: headers,
     withCredentials: true
   });

   var response = this.http
       .get('website', options)
       .map(res => {
           return res;
       })

thats the main bit. Atm i login via PAW(software) while I test. I receive the cookie data and then include it in headers.append(‘Cookie’,’Cookie value’);

Any ideas?

Posts: 1

Participants: 1

Read full topic

How to view 360 image in my ionic 2 app?

Ionic Push to more then one user

$
0
0

@Bausen wrote:

Hello,

since a few days I have a problem with my app / push service.
We sent one message to more than 100 users. Everything works fine, but now I can only sent the message to 5 users (max). If I add more than 5 Users, ionic doesn’t sent the push and I get an empty result:

{
"data": [],
"meta": {
"status": 200,
"version": "2.0.0-beta.0",
"request_id": "19efb311-c6a2-4ec9-a235-84c2bee1aca3"
}
}

Did Ionic change anything or it is a bug of the beta?

Nice regards
Marcus Bausen

Posts: 1

Participants: 1

Read full topic

Fabric Crashlytics

$
0
0

@dpmco wrote:

Hi all,

I installed https://github.com/sarriaroman/FabricPlugin and i need to know how to import the plugin and simulate a crash, here's my code :

import {Component} from '@angular/core';
import {Platform, ionicBootstrap} from 'ionic-angular';
import {StatusBar} from 'ionic-native';
import {TabsPage} from './pages/tabs/tabs';
import {HTTP_PROVIDERS} from '@angular/http';
import {CloudSettings, provideCloud} from '@ionic/cloud-angular';
import {Push} from 'ionic-native';

const cloudSettings: CloudSettings = {
'core': {
'app_id': '363e500b'
}
};

@Component({
template: '',
providers: [HTTP_PROVIDERS]
})
export class MyApp {

private rootPage: any;

constructor(private platform: Platform) {
this.rootPage = TabsPage;

window.fabric.Crashlytics.sendCrash();

platform.ready().then(() => {


  StatusBar.styleDefault();

  var push = Push.init({
    ios: {
      alert: "true",
      badge: true,
      sound: 'false'
    }
  });

  push.on('registration', (data) => {
    console.log(data.registrationId);
    alert(data.registrationId.toString());
  });

  push.on('notification', (data) => {
    console.log(data);
    alert("Hi, Am a push notification");
  });

  push.on('error', (e) => {
    console.log(e.message);
  });


});

}
}

ionicBootstrap(MyApp, [provideCloud(cloudSettings)]);

Thanks

Posts: 1

Participants: 1

Read full topic

background-Mode not work

$
0
0

@hanie wrote:

I making mp3 player with ionic. I use "cordova.plugins.backgroundMode.enable()" for play music in background if close the app.
But when press hardware back button on Android is "stopping and closing" the app instead of just "closing and go back".
I tried to control with "$ionicPlatform.registerBackButtonAction" but not work.
how can i do ? :frowning:

Posts: 1

Participants: 1

Read full topic

Can i know that if this app is built with ionic?


Prevent ion-slides from centering

$
0
0

@audan2009 wrote:

Hello,

Is there anyway to override the "centering" of the ion-slides so that it behaves like a normal page?

Thanks!

Posts: 1

Participants: 1

Read full topic

Impossible to create basic Chat app in Ionic2

$
0
0

@malma67 wrote:

It takes abut 20 mins in iOS to create a basic chat page (client only) - In ionic 2 it seems impossible after many hours of work speaking with many developers.

There seems to be no reliable way to keep the keyboard displayed after the input loses focus.

This is a serious limitation of an otherwise great framework. - although id like to use ionic - i cant until a basic chat page app is available that has the typical functionality and that the keybaord does not drop down on every message sent.

Posts: 1

Participants: 1

Read full topic

How to create and deploy content to Ionic app from external file(s)?

$
0
0

@Pablo74 wrote:

Hi all devs!

So, the idea is simple: I would like to have an app with possibility to download external content. The app will be used as "student book" for learning purposes (text, picture).

I am looking for a simple solution for users: be able to create content (outside the app), then upload this file(s) to the cloud (maybe Google drive?), run the mobile app, insert link to the file and the app will download the file and show it. Once downloaded, the file will be saved and used from phone storage next time.

Any ideas how to...?

Posts: 1

Participants: 1

Read full topic

Wrong type on Contacts.phoneNumbers

I have installed ionic what next please

$
0
0

@khandxb wrote:

Dear Friends,

I am totally new to ionic, I tried year ago and could not understand then I stopped using it.
Now I can see ionic has developed a lot and made it easier for everybody to use it.

Now I started enjoying learning the framwork, I have installed ionic and also created my first App package and also I have uploaded my app files to the online panel which is available at https://apps.ionic.io/app
Now I wonder what is the next step please? I have tried a lot searching in Google & Youtube but I don't know what is the best next way to get started.
I have a social networking site based on PHP, I want to build an app for my that site. I wonder how now I can convert my that website into ionic App? How I can start adding the links of my website to the App.

Appreciate if someone can guide me in easy simple words step by step how to begin now?

I can see the the front screen at https://apps.ionic.io/app/ which shows Ionic Push and asking me to start creating push notifications. I wonder do I have to setup that now or I can do at the end?

My main aim is to build ionic app for my that website and also I want to send push notifications to my users whenever someone likes their post or follow etc.

Please guide me so that I can start working/ learning & enjoying my first ionic app.

Thanks heaps in advance.
Cheers

Posts: 1

Participants: 1

Read full topic

Viewing all 70854 articles
Browse latest View live


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