Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 49110 articles
Browse latest View live

Resume/cv application

$
0
0

@fadlihusin wrote:

Hello there, i want to create resume/cv application. can i use the log in source code as my resume/cv?

Posts: 1

Participants: 1

Read full topic


Unable to open ModalController with lazy loading ionic3

$
0
0

@Jibe wrote:

I’m implementing lazy loading in my ionic 3/angular5 app in order to boost performance. But I’m unable to open a modal using it and it drives me crazy. I have a page (Journal in red) where I load messages and display them (message-item in green). When the user click on it, it open the full message (MessageModal in blue) on a modal like below.

enter image description here

I created 3 separate modules for each of them. But I keep getting the following error after a tap on the button OPEN MESSAGE although I added the MessageModal to the message-item module :

Uncaught (in promise) : Error : No component factory found for
MessageModal. Did you add it to @NgModule.entryComponents

So I tried to add the ModalMessage to entryComponents to each modules/components but it still doesn’t work and I’m really stuck.

JournalModule should need to import the MessageModule and MessageModalModule and MessageModule should add MessageModal to its entryComponents. Please find the code below :

journal.module.ts

@NgModule({
  declarations: [ JournalPage  ],
  imports: [
    MessageModalModule,
    MessageModule,
    IonicPageModule.forChild(JournalPage)
  ],
  providers: [JournalService],
  exports: [JournalPage],
  entryComponents :[MessageModal]
})
export class JournalPageModule {}

Piece of journal.html

 <ion-list *ngIf="messages.length !=0 && messageLoaded == true">
          <message-item *ngFor="let message of messages" [message]="message"  (quizz)="handleQuizzResult($event)"  (delete)="deleteMessage($event)" (isRead)="messageRead($event)" ></message-item>
 </ion-list>

message.module.ts

@NgModule({
  declarations: [ MessageItem ],
  entryComponents : [MessageModal],
  imports: [ IonicPageModule.forChild(MessageItem)],
  exports : [MessageItem]
})
export class MessageModule {}

Piece of message.ts

@IonicPage()
@Component({
   selector: 'message-item',
   templateUrl: './message.html',
   entryComponents : [MessageModal]
})

...

let modal = this.modalCtrl.create( MessageModal, { message : this.message });

message-modal.module.ts

@NgModule({
  declarations: [ MessageModal ],
  imports: [ IonicPageModule.forChild(MessageModal)],
  exports : [MessageModal]
})
export class MessageModalModule {}

I don’t know where am i wrong… Any advices/docs appreciated !

Posts: 2

Participants: 2

Read full topic

Login function dose not work

$
0
0

@flycoders_sourav wrote:

I want to create a basic login using providers.
Below my code.

providerlogin.ts

import { Injectable } from '@angular/core';
//import { Storage } from '@ionic/storage';
import { Http, Response } from '@angular/http';
import { Events } from 'ionic-angular';
import 'rxjs/add/operator/map';
  /*Generated class for the LoginProvider provider.

  See https://angular.io/guide/dependency-injection for more info on providers
  and Angular DI.
*/
@Injectable()
export class LoginProvider {
url:string;
  constructor( private http: Http) {
     this.url = "http://www.mydomain.com/demo/append/index.php/Login/";
  }

   login(data: any){
    let seq = this.http.get(this.url+data.useremail+"/"+data.password);
    seq.map((res:Response) => {});

    return seq;
  }
}

below my home.ts

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { MyProvider } from '../../providers/my/my';
import { LoginProvider } from '../../providers/login/login';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
useremail:string;
password:string;

  constructor(public navCtrl: NavController, public postService:MyProvider, public userService:LoginProvider) {

  }

ionViewDidLoad(){

this.postService.load();

}
userlogin(){
alert(this.useremail)
	this.userService.login(this.useremail,this.password);
}
}

HTML

<ion-header>
  <ion-navbar>
    <button ion-button menuToggle>
      <ion-icon name="menu"></ion-icon>
    </button>
    <ion-title>Home</ion-title>
  </ion-navbar>
</ion-header>

<ion-content padding>
 <ion-item>
    <ion-label floating>Email</ion-label>
    <ion-input type="text" [(ngModel)]="useremail" required=""></ion-input>
  </ion-item>

  <ion-item>
    <ion-label floating>Password</ion-label>
    <ion-input type="password" [(ngModel)]="password" required=""></ion-input>
  </ion-item>

  <div padding>
      <button ion-button block (click)="userlogin();">Login</button>
  </div>

  <button ion-button color="secondary" (click)="homeredirect()">Skip</button>
</ion-content>

please help me anyone how to login function is work.

Posts: 1

Participants: 1

Read full topic

How to set placement attribute of ion-label dynamically?

$
0
0

@hape wrote:

Hi there,

i am wondering if there is any possibility to set the ion-label placement attribute (floating, stacked or fixed) dynamically?
There doesn’t seem to be some property like [placement]="...", or is there?
I also tried to implement this via a custom directive with this.renderer.setElementAttribute(this.elementRef.nativeElement, "floating", "''"); on ngInit but this doesn’t seem to work either.

Any thoughts or ideas?
thanks…

Posts: 1

Participants: 1

Read full topic

Error while post request

$
0
0

@guptajagadish843 wrote:

getPerformance(username:string)
{
let body = new FormData();
body.append(‘username’,username);

var result;
if(result)
{
	Promise.resolve(result);
}

return new Promise(resolve=>{
this.http.post(“http://www.example.in/example/example.php”,body).subscribe(data=>{

       result = data;
       resolve(result);

    },error=>{

       result = error;
       resolve(result);
    });
});

}

The above is my code trying make a post request to the server
But many times im getting net::ERR_CONNECTION_RESET error and sometimes it is working if we make request many why is that somebody help me

Posts: 1

Participants: 1

Read full topic

Show Iframe inside ionic 3 app

$
0
0

@Hanzo wrote:

Hi,

I’m trying to show an iFrame into a ion-content of a page.

Like this:


  <iframe width="100%" height="100%" src="url"></iframe>

When open the page the console returns the error

Refused to display ‘url’ in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’.

I’ve tried to add a proxy on the ionic.config.json file and use it into iframe src but it not works.

How can I use an iframe in ionic3 3.9.2

Thanks

Posts: 1

Participants: 1

Read full topic

Cannot install Local Notifications

$
0
0

@ArsalanSavand wrote:

Hi, I’m using Ionic 2x ( and above ) and I have a problem installing Local Notifications.
This is the command I run for installing it :

ionic cordova plugin add de.appplant.cordova.plugin.local-notification

This is the error I get while installing it:

cordova plugin add de.appplant.cordova.plugin.local-notification --save
Installing "de.appplant.cordova.plugin.local-notification" for android

Plugin dependency "cordova-plugin-device@1.1.7" already fetched, using that version.

Dependent plugin "cordova-plugin-device" already installed on android.

Failed to install 'de.appplant.cordova.plugin.local-notification': CordovaError: Failed to fetch plugin cordova-plugin-app-event via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/cordova-plugin-app-event" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/xxx/.npm/_logs/2017-11-24T11_55_27_043Z-debug.log
    at /usr/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:205:33
    at _rejected (/usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:864:24)
    at /usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:890:30
    at Promise.when (/usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:1142:31)
    at Promise.promise.promiseDispatch (/usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:808:41)
    at /usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:624:44
    at runSingle (/usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:137:13)
    at flush (/usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Error: Failed to fetch plugin cordova-plugin-app-event via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/cordova-plugin-app-event" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/xxx/.npm/_logs/2017-11-24T11_55_27_043Z-debug.log

[ERROR] An error occurred while running cordova plugin add de.appplant.cordova.plugin.local-notification --save (exit
        code 1).

If you can help me fix this, it would be great.

Posts: 1

Participants: 1

Read full topic

No permission request at first start after install

$
0
0

@development4u wrote:

Helle there,

my title says all.

I have created a blank app and added the device plugin.

constructor(private platform: Platform, public navCtrl: NavController, public device: Device)
{
	this.platform.ready().then((readySource) => {
		console.log(this.device.uuid);
    	});
}

After the installation, the uuid returns null, if i quit the app and open again, i asked fpr permissions to access the phone.
After grand the permission, the uuid returns correctly.

Steps:

  1. Install app
  2. Open app first time
  3. No permission request
  4. uuid = null
  5. quit app
  6. reopen app
  7. permission request opened
  8. uuid not null

Does anybody know this?

Posts: 2

Participants: 1

Read full topic


Programatically change ion-scroll position in ionic 3

$
0
0

@fritsl wrote:

Hello,

I have an image inside an ion-scroll that changes in size depending on a slider.
I’d like it for the image to stay in the center. How do I programmatically change the position of the scrollbars in ionic 3?

I have seen various posts about ionic v1 but nothing about ionic 3.

Thanks!

Posts: 1

Participants: 1

Read full topic

No lines are shown

$
0
0

@mdline wrote:

Hello,

the cars are not displayed one below the other and how to get the separator lines between?


<ion-content>
  <ion-list>
    <button ion-button ngFor="let car of cars let i = index" (click)="carClicked(i)">
        {{ car.name}}
    </button>
  </ion-list>
</ion-content>

Posts: 1

Participants: 1

Read full topic

Translate the time period (AM, PM) in ion-datetime

$
0
0

@leon4 wrote:

Hey everyone,

Is it possible to translate the time period (AM, PM) from ion-datetime? I have successfully translated the other text (cancelText, dayNames etc), but there is no reference for the time period in the documentation. See here: input properties.

Any ideas?

Posts: 1

Participants: 1

Read full topic

DateTime component: Request for input property "secondValues"

Gradle build daemon disappeared unexpectedly

$
0
0

@gitlab-lgn wrote:

Hello guys

Following kensodemann advice, I’m c/cing my github issue here since this is more a support thing than an issue. I’m stuck with no lead to investigate, any idea is welcomed !

Ionic version: (check one with “x”)
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.x
[ ] 4.x

I’m submitting a … (check one with “x”)
[x] bug report (sort of, just asking for lead to solve my CI issue)
[ ] feature request

Current behavior:

I’m trying to set up a CI to build Ionic project. The SCM is Gitlab 10, the CI being Gitlab-CI.

A gitlab-runner 10.1.0 running over an AWS EC2 instance with Amazon Linux is the component executing the build job. Here’s the .gitlab-ci.yml defining the job

image: beevelop/ionic:latest
stages:
  - build
build:
  stage: build
  script:
    - df -m
    - free -m
    - npm install
    - ionic config set -g telemetry false
    - ionic info
    - ionic cordova platform add android
    - ionic cordova build android --debug

The script part itself is executed in a fresh beevelop/ionic:latest container. Just to be sure, I did all those step manually on the same container running on my workstation. It worked there.

But on the runner, it’s ending with a Gradle build daemon disappeared unexpectedly. I tried all the options I could find, like ionic cordova build android --debug -- -- --gradleArg=--no-daemon, nothing. I buffed the EC2 up to 2CPU 4Go RAM, didn’t worked out too. The full build log is below, including ionic info.

Expected behavior:

A working build.

Steps to reproduce:

The .gitlab-ci.yml is above, one just need a functionnal Gitlab + Gitlab-CI with a runner, a simple ionic project (I tried on a brand new Ionic project).

Related code:

The build log is in the first reply since this post would be too long otherwise

Other information:

I asked the author of the docker image, beevelop/ionic, no better lead.

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):


cli packages: (/opt/node/lib/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

local packages:

    @ionic/app-scripts : 3.1.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v8.9.1
    npm  : 5.5.1
    OS   : Linux 4.9

Misc:

    backend : pro

Posts: 1

Participants: 1

Read full topic

Ion-scroll zoom not working

$
0
0

@fritsl wrote:

Hello,

I can’t get the zoom function working on my ion-scroll. I looked around and this seems to be a bug with ionic. Is there a fix for this?

Thanks

Posts: 1

Participants: 1

Read full topic

I want to predicate feature price by giving some past price and date in ionic

$
0
0

@Packiyanathan wrote:

I want to predicate feature price by giving some past price and date in ionic ( inputs: past price and date, output: feature price)

Posts: 1

Participants: 1

Read full topic


Next Page not shown sometine

$
0
0

@cisocybersecurity wrote:

this.navCtrl.setRoot(SecondPage, {
        x: 1
      });

I have used this for navigating to another page. But some time I successfully able to move to SecondPage and sometime not.

Posts: 1

Participants: 1

Read full topic

Tabs displaying not well

$
0
0

@HamdySdiri wrote:

I uninstall the node modules and reinstall.
I try to open my project. I faced a problem with the tabs
tabs

No of the first page or the second page appears.
How Can I resolve the problem.

Posts: 1

Participants: 1

Read full topic

CORS madness

$
0
0

@earnestware wrote:

I’m starting to invest a lot of time in your product and don’t mind buying a subscription but I am interested in finding a solution to the CORS issue when coding and using “ionic serve”. I’ve setup the json project file as per a blog article but it doesn’t work, Thanks

Posts: 2

Participants: 2

Read full topic

Create audio file in my app folder

$
0
0

@AllartSoftworks wrote:

Hi, I use this code succesfully to record an audio note within an Android app:

(...)
import  { Media, MediaObject } from '@ionic-native/media';
import { File } from '@ionic-native/file';
(...)

@IonicPage()
@Component({
  selector: 'page-modal-add',
  templateUrl: 'modal-add.html',
  providers: [ File ]
})
export class ModalAddPage {

  private activityForm: FormGroup;
  data: any;
  todayDate: string;

  constructor(
    public navParams: NavParams,
    private view: ViewController,
    private navCtrl: NavController,
    private formBuilder: FormBuilder,
    public database: DatabaseProvider,
    public alertCtrl: AlertController,
    private media: Media,
    private file: File
  ) {
 (...)
  }

  startRecordingAudio() {
    try {
      this.file.createDir(this.file.dataDirectory, 'Notes', false);

      const audioFile: MediaObject = this.media.create('./audioFile.mp3');

      this.showAlert(audioFile, 'Info', 'Start recording!');
      audioFile.startRecord();
    }
    catch (e) {
      this.showAlert(null, 'Error', 'Could not start recording.');
    }

  }

  showAlert(fileHandler, type, message) {
    let alert = this.alertCtrl.create({
      title: type,
      subTitle: message,
      buttons: [{
        text: 'Stop recording',
        handler: () => {
          fileHandler.stopRecord();

        }
      }]
    });
    alert.present();
  }

  closeModal(){
(...)
  }

}

And it creates an audioFile.mp3 file at /storage/emulated/0 path.

I now need to create the file inside a

/Notes/audio/

folder, not inside /storage/emulated/0 one as it does now.

I tried to use

const audioFile: MediaObject = this.media.create( this.file.dataDirectory + './audioFile.mp3');

with no luck (it creates a 3gp file with an arbitrary name, instead).

How can I accomplish it?

Thank you in advance.

Posts: 1

Participants: 1

Read full topic

Performance of Ionic in Large Apps

$
0
0

@mregan59 wrote:

I’m about to begin development on a dating app. I’m considering going with Ionic but don’t know if it can handle the large amount of data (profile info, pictures, messaging, searching, etc). The site has tens of thousands of users so lots of scrolling and images. Does anyone have experience with an app of such size and how it performed using ionic?

Posts: 1

Participants: 1

Read full topic

Viewing all 49110 articles
Browse latest View live


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