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

Border-radius in tabs

$
0
0

@alexvainio wrote:

Hi! I’m trying to make my tabs controller have round top corners, like this:

header
(This is my header so don’t get confused, I just need the same effect)

I’ve tried to add a class and then in SCSS add the border-radius property.
I have also tried variables without any luck. I can’t find any information about this anywhere!

Is this even possible? I’m using Creator but I guess it should work the same way as in v1?

Posts: 1

Participants: 1

Read full topic


Problem with subjectID

$
0
0

@dipankar123 wrote:

hi, i am new in ionic 2
i have get subjectID from another page through navParams
but when i implemented it in afunction found error:
"Uncaught (in promise): TypeError: Cannot read property ‘SubjectID’ of undefined"
here is my code:
in provider:
subjectBasedAttnd( AuthToken: string, SubjectID: string) {
let headers = new Headers({
‘AuthToken’: AuthToken
});

let options = new RequestOptions({
  headers: headers
});
return new Promise(resolve => {
  this.http.get("http://122.160.53.175:83/smartrollcall/api/WebRequest/GetDateWiseAttendance?StartDate="+" "+"&EndDate="+" "+"&SubjectID="+SubjectID, options)
    .map(res => res.json())
    .subscribe(
    data => { resolve(data) },
    err => { console.log(err) }
    );
});

}

in page.ts:
subject: any;
attendenceList: any;
item: any

constructor(public navCtrl: NavController,
public navParams: NavParams,
public storage: Storage,
public userProvider: UserProvider, ) {
this.subject = navParams.get(‘item’); // getting value

//console.log('id: ' + this.subject.SubjectID);
this.subjectAttendence();

}

subjectAttentList(){
return this.attendenceList;
}

subjectAttendence() {
console.log(‘subject clicked’);
this.storage.get(‘token’).then((value) => {
console.log('subtoken: ’ + JSON.parse(value).AuthToken);
this.userProvider.subjectBasedAttnd(JSON.parse(value).AuthToken, this.subject.SubjectID).then(data => {
console.log('list: ’ + data)
this.attendenceList = data;
});
});
}

ionViewDidLoad() {

console.log('ionViewDidLoad SubjectDetailsPage');

}

}

Posts: 1

Participants: 1

Read full topic

Ionic 3. Local Notifications - progressBar

$
0
0

@anton_klochko wrote:

Hi all ! Could anyone suggest please, why in Local Notifications documentaion we do not have param progressBar ? Is it possible now to add progressBar to Local Notifications and show file downlowded progress ?

Posts: 1

Participants: 1

Read full topic

Weird google map error! can't pass new google.maps

$
0
0

@pdj wrote:

alert("creating map");
        location=new google.maps.LatLng(37.5665,126.9780)
        alert("!")

it’s weird.
It works very well on chrome but not on real device. android.
it alert creating map well but can’t see alert !
I installed plug in like below.

ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION=“To locate you”

npm install --save @ionic-native/geolocation

Posts: 1

Participants: 1

Read full topic

Ionic ngx translate

Video Stream Plugin

$
0
0

@felix9607 wrote:

Hey there,

what is the best way to implement a Video stream between two Person with Ionic 3?
I searched the Internet and found stuff like RTCMultiConnection but I had Trouble to use it with Ionic and importing the correct stuff to make it work.

Any suggestions?
thank you

Posts: 1

Participants: 1

Read full topic

Flow for debugging ionic components

$
0
0

@HugoHeneault wrote:

Hi there,

I’m looking for a functionnal flow for working on ionic components (ionic-angular), like debugging virtualscroll…

It should:

  • Allow ionic components editing in typescript
  • Inject this modified components in a current project
  • Be fast (so I don’t have to rebuild manually my project everytime I’m making a change on the Ionic components).

How are you doing that?

Posts: 1

Participants: 1

Read full topic

How to access ion-tabs component in ionic3?

$
0
0

@aparna19 wrote:

As guided in @ionic documentation I am using @ViewChild(‘mytab’) mytab:Tabs to access my tabs as shown below:
<ion-tabs class=“tabs-icon-text” #mytab selectedIndex=“0”>
<ion-tab [root]=“tab1Root” tabIcon=“icon-article” tabTitle=“Article”>
<ion-tab [root]=“tab2Root” tabIcon=“icon-print” tabTitle=“NewsLetter”>
<ion-tab [root]=“tab3Root” tabIcon=“icon-user” tabTitle=“User”>

but while I am trying to get selected tab using this.mytab.getSelected() I am getting error:
Uncaught (in promise): TypeError: Cannot read property ‘getSelected’ of undefined TypeError: Cannot read property ‘getSelected’ of undefined at new TabsPage.
Is there any other way to access tabs ionic3 and angular4?

Posts: 1

Participants: 1

Read full topic


Live Deploy is not working as expected (Always Debug Mode)

$
0
0

@danielederosa wrote:

Hi guys,

There are some issues with Live Deploy on my app.

I build the Ionic3 App with the --prod flag, but on start still shows the alert “Deploy: Debug - A newer version if this app is available…This warning only appears in debug builds”… also I get this alert after each start…if I click “Ignore” I have a very very old app version. If I update, i get the current version.

What can be the problem of this? Any ideas?

Posts: 1

Participants: 1

Read full topic

IONIC 3 joining two nodes of the firebase and returning a FirebaseListObservable

$
0
0

@VagnerSabadi wrote:

I would like some help from you. I need to fetch an id inside a node in the firebase and use that id to access another node that would fetch a FirebaseListObservable and return to the view. Until then I managed to get these nodes, problem is to transform and return FirebaseListObservable, I really do not know how to do it. I have the following code

todosUsers: FirebaseListObservable<User[]>;

 public busca(userId): any {
this.db.list(`/voto/` + userId).subscribe(votos => {
  votos.forEach(voto => {
    this.db.list('/users/' + voto.key).subscribe((users) => {
      console.log("->" + users);
      this.todosUsers = users;//problem how do i return this.todosUsers
    })
  })
})

Posts: 1

Participants: 1

Read full topic

Get http status : 0 when using GET method?

$
0
0

@ThunderBirdsX3 wrote:

I got this error.

{"_body":{"isTrusted":true},"status":0,"ok":false,"statusText":"","headers":{},"type":3,"url":null}

When try to get data from local server.

I ever got problem like this when use POST method with Content-type: application/json. It about CORS and I already solve this problem.

But why It happen with GET method. Or I made some thing wrong, I try with Postman it was fine.

This is my code

  get(uri) : Promise<any> {

    let options = new RequestOptions({
      headers: new Headers({
        'Authorization' : 'Bearer ' + this.user.data.access_tokens
      })
    });
    let end_point = this.api_server + uri;
    console.log('GET : ' + end_point);
    // console.log(JSON.stringify(options));

    return this.http.get(end_point,  options)
    .toPromise()
    .then(response => Promise.resolve(response.json()) )
    .catch(error =>  Promise.reject(error) );

  }

But POST method didn’t get any error.

  post(uri, data) : Promise<any> {

    let options = new RequestOptions({
      headers: new Headers({
        'Content-Type': 'application/json',
        'Authorization' : 'Bearer ' + this.user.data.access_tokens
      })
    });
    let end_point = this.api_server + uri;
    console.log('POST : ' + end_point, JSON.stringify(data));
    // console.log(JSON.stringify(options));

    return this.http.post(end_point, data, options)
    .toPromise()
    .then(response => Promise.resolve(response.json()) )
    .catch(error =>  Promise.reject(error) );
  }

ionic info

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0

global packages:

cordova (Cordova CLI) : 6.5.0

local packages:

@ionic/app-scripts : 3.1.0
Cordova Platforms  : ios 4.5.3
Ionic Framework    : ionic-angular 3.9.2

System:

ios-deploy : 1.9.2
ios-sim    : 6.1.2
Node       : v6.11.0
npm        : 5.5.1
OS         : macOS High Sierra
Xcode      : Xcode 9.1 Build version 9B55

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : legacy

Ps. http is @angular/http

Posts: 1

Participants: 1

Read full topic

Ionic 3 slides

$
0
0

@jimmywutang wrote:

has anyone figured out how to get more than 1 ion-slide on your view page without them interfering with each other i.e when i try to swipe through the first slide it affects the second slide

Posts: 1

Participants: 1

Read full topic

Please update @angular/cli. Angular 5+ requires at least Angular CLI 1.5+

$
0
0

@anton_klochko wrote:

After update Ionic to Ionic 3.9.2 I receive the error when building with --prod flag (ionic). Could anyone suggest please, how to fix this ?

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0
global packages:

cordova (Cordova CLI) : 7.1.0
local packages:

@ionic/app-scripts : 2.0.2
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.9.2
System:

Android SDK Tools : 25.2.5
Node              : v6.9.0
npm               : 3.10.8
OS                : Windows 7
Environment Variables:

ANDROID_HOME : C:\Users\anton\AppData\Local\Android\sdk
Misc:

backend : pro

Posts: 1

Participants: 1

Read full topic

Refactoring repeatable code

$
0
0

@ashley_shookhye wrote:

Dear All,

I have this specific code that I have to include in each component before transitioning to each page. Basically I need to check whether the JWT has expired or not.

let isTokenExp = this.jwtHelper.isTokenExpired(data);
        if (isTokenExp) {
          let alert = this.alertCtrl.create({
            title: 'Warning',
            subTitle: 'Your session has been expired. You will be logged out.',
            buttons: ['Ok']
          })
          alert.present();
          alert.onDidDismiss(() => {
            //clear token
            this.authTokenService.deleteToken().then(() => {
              this.navCtrl.setRoot('LoginPage');
            }).catch((err) => {
              //alert error to user.
              this.navCtrl.setRoot('LoginPage');
            })
          })
        }

Would want a way to write it once and use it everywhere? Please advise.

Thanks,
Ashley

Posts: 2

Participants: 2

Read full topic

Get image from url

$
0
0

@Hanzo wrote:

Hi,

I’m trying to represent an image into the UI of my app.

This is the code of my request service:

requestBlob(url): Promise<any> {

    if (this.connectivityService.isOnline()) {
      let headers = new Headers({'Content-Type': 'application/jpeg'});
      return this.http.get(url, {withCredentials: true, responseType: ResponseContentType.ArrayBuffer, headers: headers}
      )
        .toPromise()
        .then((response) => {

          const toDownload: Blob = new Blob([response.arrayBuffer()], {type: 'image/jpeg'}); //and this type:
          console.log(toDownload)
          return URL.createObjectURL(toDownload)

        }).catch(error => {
          return Promise.reject(error);
        })
    }
    else throw {systemerror: "noconn"}
  }

For example for this google image:

http://www.classictvinfo.com/PerryMason/TVSeries1/Person.jpg

The method returns an url like this:

blob:http://localhost:8100/01b86ed4-72e2-405a-a834-5d991d91bac0

If i bind this result to src of an this not render the image.

What I’m doing wrong?

Posts: 1

Participants: 1

Read full topic


How to implement slick slider in ionic 3

$
0
0

@akhilsanker94 wrote:

Hi,
I need to use slick ,center mode, slider in my project and also to get the json datas of the current active slider image.
Also next and previous images should be seen on either side of the current image.

Any suggestion is appreciable.
Thanks,

Posts: 1

Participants: 1

Read full topic

Ionic 3 ion-slide issue with loop true

$
0
0

@kamakshi wrote:

Hi Team,

Facing issue with loop true, when i use this property , slide images and bullets (pager dots) are not updated accordingly.

Posts: 1

Participants: 1

Read full topic

Integrating ionic 3 module inside ionic 1 project

$
0
0

@aks257 wrote:

I have a existing ionic 1 project, in which i have to create one extra module in ionic 3 / ionic 2. Currently I am coping my whole “www” folder from ionic 1 manually into my ionic 3’s build and have given links to switch between 2 projects. This works fine along with localStorage to access / transfer data between them.

var fs = require('fs-extra');
fs.copy('src/www/index1.html','www/index1.html');

I have tried to over write the file “ionic.config.json” like above and in package.json,

"scripts" : {
"ionic:build": "ionic-app-scripts build --copy ionic-config-override.js",
"ionic:serve": "ionic-app-scripts serve --copy ionic-config-override.js"
}

Requirement to be ionic 1 project to be opened by default, and then on click of a
particular link / button, it must navigate to some page which will be
written in ionic 3

Can some work around be done to automatically generate builds for both ionic 1 and ionic 3 project which i am currently working on?

Posts: 1

Participants: 1

Read full topic

Loops on Ion-HTML page

$
0
0

@pendora7 wrote:

Hey, I have a JSON URL from which i am getting the below data,
image.
I want to print “qhtext” once and it’s “qotext” below it. (Heading and it’s options)
image.
Here is my code, I am using Ionic 3 need some suggestions on how to implement this logic. Thank You

Posts: 1

Participants: 1

Read full topic

Integrating ionic 3 module inside ionic 1 project

$
0
0

@Karthikgbhat wrote:

I have a existing ionic 1 project, in which i have to create one extra module in ionic 3 / ionic 2. Currently I am coping my whole “www” folder from ionic 1 manually into my ionic 3’s build and have given links to switch between 2 projects. This works fine along with localStorage to access / transfer data between them.

var fs = require('fs-extra');
fs.copy('src/www/index1.html','www/index1.html');

I have tried to over write the file “ionic.config.json” like above and in package.json,

"scripts" : {
"ionic:build": "ionic-app-scripts build --copy ionic-config-override.js",
"ionic:serve": "ionic-app-scripts serve --copy ionic-config-override.js"
}

Requirement to be ionic 1 project to be opened by default, and then on click of a
particular link / button, it must navigate to some page which will be
written in ionic 3

Can some work around be done to automatically generate builds for both ionic 1 and ionic 3 project which i am currently working on?

Posts: 1

Participants: 1

Read full topic

Viewing all 70448 articles
Browse latest View live


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