Quantcast
Viewing all 70870 articles
Browse latest View live

ORIGINAL EXCEPTION: Attempt to use a destroyed view: detectchanges

@EddyTheDove wrote:

Hi I have this error that occurs after RESUBMITTING a form. First submit, I dont enter anything, so the validation fails. second submit, I have this error. What may be the cause of this error? Please, help
Image may be NSFW.
Clik here to view.

Posts: 1

Participants: 1

Read full topic


Getting crazy - Items bottom aligned in android

@danielgroh wrote:

Hi I hope someone can help,

I've never had such a problem to align items to the bottom.

I'm using flexbox for that and our page has the following structure:

ion-header
ion-content
   scroll-content // display: flex; flex-direction: column;
     ion-card // flex-shrink: 0;
     ion-card // flex-grow:1; flex-shrink: 0;
     ion-list

Both ion-cards should be top aligned and the list bottom aligned, which I could accomplish, BUT, in Android or MD mode, the list is not well positioned, see the print:

In Windows and iOS it is working fine, see print how it looks on iOS:

The most weird thing is: If I rotate to landscape and turn back to portrait, the issue is gone.

Does anyone has a clue or has faced something similar?

Posts: 1

Participants: 1

Read full topic

Lock screen orientation for one page

Issue in splashscreen

@varshil29 wrote:

I set splashscreen and display properly. but problem is that splash screen display only once.when i exitapp and immediately going in app..white screen display..

code that i used

 <preference name="webviewbounce" value="false"/>
  <preference name="UIWebViewBounce" value="false"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="android-minSdkVersion" value="15"/>
  <preference name="BackupWebStorage" value="none"/>
  <preference name="SplashScreenDelay" value="0"/>
  <preference name="FadeSplashScreen" value="false"/>
  <preference name="ShowSplashScreen" value="false"/>
  <preference name="AutoHideSplashScreen" value="false"/>
  <preference name="ShowSplashScreenSpinner" value="false"/>
  <preference name="SplashScreen" value="screen"/>


hideSplashScreen() {
     // if(navigator && navigator.splashscreen) {
      setTimeout(()=> {
      Splashscreen.show();
      Splashscreen.hide();
      }, 1000);
    //}
  }

i put above function in app.ts file

Posts: 2

Participants: 2

Read full topic

Ionic2 Select display problems

@lsiltic wrote:

Select text and radio buttons are centered and I cant get them align right like in examples.
Any1 else got this problem?
Help please.

Image may be NSFW.
Clik here to view.

Used ionic2 tutorials example:

<ion-item>
  <ion-label>Gender</ion-label>
  <ion-select [(ngModel)]="gender">
    <ion-option value="f" selected="true">Female</ion-option>
    <ion-option value="m">Male</ion-option>
  </ion-select>
</ion-item>

Posts: 1

Participants: 1

Read full topic

Migrating Ionic 2 to Typescript 2.x

@Codekhalifah wrote:

I'm attempting to use D3 with Ionic 2, but in order to use the typings for D3 I must use Typescript 2.x. I'm using Ionic 2.0.0-beta.37. There is a new Typescript Release Candidate which can be seen here in the MFST Blog. How can I migrate my project over to use the Typescript 2?

Posts: 1

Participants: 1

Read full topic

Sass: Including mixing library (Compass, Bourbon, etc.)?

@reedrichards wrote:

Seems not to be the most popular subject in the forum, therefore I wanted to know your advices about including or not including a sass mixin library like Compass or Bourbon in a Ionic2 project?

Actually I ask my self this because I add to implement a linear gradient and I didn't wanted to reinvent the wheel, that's why I included Bourbon (in comparison to Compass, seems to be lighter).

So, any thought? Good or bad? Or absolutely no need to done (maybe Ionic provide such mixins, I didn't found it but maybe)?

Thx in advance for your help.

Posts: 1

Participants: 1

Read full topic

Click button to change text on ionic-card

@BernardG16 wrote:

Hi!
I'm trying to do a simple application whereby if I click a button, the text in the card would change according to what button I click on. Here is a sample of my code:

The body tag is:
<body ng-app="app" ng-controller="MainCtrl">

The rest of it is:

<div class="list card" id="rosary-card21" ng-controller="cardCtrl">
        <h4 id="rosary-heading5" style="color:#5239FF; text-align: center">Prayer</h4>
        <div id="rosary-markdown3" style="color:black; height: 200px" >
            <p>
              Show Something!
              <my-directive data="myData">
              </my-directive>
            </p>
        </div>
    </div>
    <!-- bead section-->
    <div ng-controller="beadCtrl">
    <ion-slides options="options" style="height: 270px; width: 130px;">
      <ion-slide-page><button class="button button-clear button-large" ng-click="changeMyData('ONE')">
        1</button></ion-slide-page>
      <ion-slide-page><button class="button button-clear button-large" ng-click="changeMyData('TWO')">
         2</button></ion-slide-page>
      <ion-slide-page><button class="button button-clear button-large" ng-click="changeMyData('THREE')">
        3</button></ion-slide-page>
    </ion-slides>
  </div>

As you can see above this is from the HTML file whereby, the button is in an ion-slide-page and each of the button.

My js controller is as below:

var app = angular.module('app');

app.controller('MainCtrl', function($scope){
	$scope.myData = {
		value: 'No value yet'
	}

	$scope.display = {
		value: 'Not fired yet'
	}
});
    app.controller('beadCtrl', function($scope, $rootScope){

      $scope.changeMyData= function(param) {
    		$scope.myData.value = param;
    	};

      $scope.options ={
        direction: 'vertical',
        slidesPerView: '3',
        paginationClickable: true,
        showNavButtons: false
      };
});

  app.controller('cardCtrl', ['$scope', function($scope, $rootScope){
         $rootScope.$on('myEvent', function(e, val){
         $scope.display.value = val;
   });
 }]);`

app.directive('myDirective', function($rootScope) {
console.log('Start directive');
return {
	template: '{{ myData.value }}',
	scope: {myData : '=data'},
	link: function(scope, element, attrs) {

	scope.$watch(attrs.data, function(newVal, oldVal) {
		if (newVal != oldVal) {
			console.log('myData has changed');
			console.log(newVal);
			}
		}, true);
	}
	}
});

The error that is shown from the console is:

2     913459   error    TypeError: Cannot read property '$on' of undefined
    at new <anonymous> (http://localhost:8100/js/app.js:64:15)
    at Object.invoke (http://localhost:8100/lib/ionic/js/ionic.bundle.js:17762:17)
    at extend.instance (http://localhost:8100/lib/ionic/js/ionic.bundle.js:22311:34)
    at nodeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:21421:36)
    at compositeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:20853:13)
    at nodeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:21457:24)
    at compositeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:20853:13)
    at nodeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:21457:24)
    at compositeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:20853:13)
    at publicLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:20728:30)

If I were to remove the ng-controller in the HTML file for cardCtrl(), then if I were to click on the button this error occurs:

1     712454   error    TypeError: Cannot set property 'value' of undefined
    at Scope.$scope.changeMyData (http://localhost:8100/js/app.js:37:23)
    at fn (eval at compile (http://localhost:8100/lib/ionic/js/ionic.bundle.js:26457:15), <anonymous>:4:239)
    at http://localhost:8100/lib/ionic/js/ionic.bundle.js:62386:9
    at Scope.$eval (http://localhost:8100/lib/ionic/js/ionic.bundle.js:29158:28)
    at Scope.$apply (http://localhost:8100/lib/ionic/js/ionic.bundle.js:29257:23)
    at HTMLButtonElement.<anonymous> (http://localhost:8100/lib/ionic/js/ionic.bundle.js:62385:13)
    at HTMLButtonElement.eventHandler (http://localhost:8100/lib/ionic/js/ionic.bundle.js:16583:21)
    at triggerMouseEvent (http://localhost:8100/lib/ionic/js/ionic.bundle.js:2948:7)
    at tapClick (http://localhost:8100/lib/ionic/js/ionic.bundle.js:2937:3)
    at HTMLDocument.tapMouseUp (http://localhost:8100/lib/ionic/js/ionic.bundle.js:3013:5)

Any help would be great especially on how to solve the $on issue. Thanks! And if anybody could point out anywhere on the web on how to achieve my simple function of a clicking a button and change a text in a ionic-card.

Posts: 1

Participants: 1

Read full topic


Typescript compilation stops on js errors?

@crkvend wrote:

Hi guys,

I have a huge problem. When I run the ionic serve command, the app.bundle.js file is not created if there is a javascript error somewhere in the code. It lists the error and that's it. Shouldn't it try to compile despite the errors? I believe that the Typescript compiler should do this (unless the "noEmitOnError" flag is set to true in tsconfig.ts), so I guess the Ionic build process somehow forces this flag to true and overrides tsconfig?

I'm converting an old (huge) Ionic 2 project (back when awesome-typescript-loader was used for compilation, I believe) to the new beta.11, and before, it ignored all the errors and everything worked just fine.

TL;DR: How can we force Ionic Serve to build the resulting js file even if there are js errors in the code?

I'm really hoping for some input here since I'm really stuck!
Thanks!

Posts: 3

Participants: 2

Read full topic

Error in security service

@yamila wrote:

Hi, i have this error when execute: $ ionic security profiles list

Error in security service. (CLI v2.0.0)

Your system information:

Cordova CLI: 6.3.0
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0
OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS
Node Version: v6.1.0

Before this error, the terminal shows me html code.
i cant do anything, cant attach credencials, cant attach provisioning profiles.

What can i do?
Thanks.
Yamila

Posts: 1

Participants: 1

Read full topic

Open two Alert at the same time

@stefanomusaico wrote:

Hello,
I'm using ionic beta 11 and I need to open two or more alert at the same time. This because there could be one or more errors in some functions but when the second alert is created the app stops working.
For example I put this code in the constructor but It seems to open one Alert and when I close it the UI doesn't work anymore.

this.alertController.create({
    title: 'Alert 1',
    subTitle: 'text 1',
    buttons: ['Dismiss']
  }).present();
this.alertController.create({
    title: 'Alert 2',
    subTitle: 'text 2',
    buttons: ['Dismiss']
  }).present();

Can you help me?

Thanks,
Stefano

Posts: 1

Participants: 1

Read full topic

Define Popover Transition Time?

@nottinhill wrote:

http://ionicframework.com/docs/v2/theming/platform-specific-styles/

I need to display a popover after another popover with using popover.onDidDismiss((data: any) => { method, we are seeing two transitions lasting two long, user needs to bring lots of patience to this.

Is there a way to speed up transitions on a pop-over individual basis like this is done on NavController with:

this.nav.push(myComp, {}, {
animation: this.transitionType,
animate: true,
duration: 200,
easing: "ease-in-out",
direction: "right"
}

So I need this for popover - or alternatively display popover over popover? Any ideas?

Posts: 1

Participants: 1

Read full topic

Ionic SqlStorage

@dodekx wrote:

I have problem on android device (android 5.x)
The code

   this.storage = new Storage(SqlStorage, { name: 'home-money' });
    this.dialyTransactionLimit = this.settings.getDialyLimit();
    let transactionTableSetup = 'id INTEGER PRIMARY KEY AUTOINCREMENT,amount REAL, description TEXT, isSynchronized INTEGER, timestamp DATETIME DEFAULT CURRENT_TIMESTAMP'
            this.storage.query(`CREATE TABLE IF NOT EXISTS transactions (${transactionTableSetup})`).then(() => {
                this.storage.set('version', 1)
            });

Work on destop browser but on android device that throw:

SQLitePlugin.js:175 OPEN database: home-money
3SQLitePlugin.js:106 new transaction is waiting for open operation
SQLitePlugin.js:179 OPEN database: home-money - OK
SQLitePlugin.js:80 DB opened: home-money

Source code can be found here here

How I can fix this one

Posts: 2

Participants: 2

Read full topic

Modal View stuck to bottom of page

@RaghavendraKumar wrote:

Hi,

I want to create CSS where the modal view can be placed at the bottom of the page. The modal transitions from bottom to top, and fixes itself to the screen at the bottom (very similar to action sheet).

Any help is appreciated.

Thanks

Posts: 1

Participants: 1

Read full topic

DeviceAdminReceiver

@starsky135 wrote:

Hi everyone,

I'm trying to use this plugin: https://github.com/oddmouse/cordova-plugin-locktask
which I've managed to implement and can call screen pinning. Now I'm trying to make the app a device owner using the docs, but I've no idea what it means by "Add a device admin sub class of DeviceAdminReceiver". I've done some Googling and can't find anything relevant. I'm assuming I have to add the provided Java in a file somewhere, but where?

Thanks

Posts: 1

Participants: 1

Read full topic


LocalStorage Restart App Problem

@mcayapim wrote:

hi, I use localstorage and I need get value but I cant get value, if restart app Can I get value else can't get value

sorry for my bad english.

Posts: 1

Participants: 1

Read full topic

Can't navigate back to homepage when the user reload the page

@geotzinos wrote:

I want the feature of ionic 2 which when a user reload a page will redirect to the rootPage. Any idea how can i do it to ionic 1 using angular 1.5 ? I tryied this code but doesn't work.

var windowElement = angular.element(window);
windowElement.on('beforeunload', function (event) {
windowElement.location.href = '/index.html';
return false;
});

Posts: 1

Participants: 1

Read full topic

App.bundle.js disappears; in previous commits on Git

@drewg2009 wrote:

While working on my ionic 2 app, seemingly in a random way the app.bundle.js and map file along with that in the www/build/js folder disappeared, giving me a 404 error that it could not find the file. I tried updating the cli via node js commands and that did not fix the problem. I tried reverting back to previous commits, copying over the app.bundle.js files, and testing but since they are at different states in the app it didn't load my current changes.

Without creating a new project how can I fix this?

Posts: 7

Participants: 2

Read full topic

Best-Practice for different image sizes (background and icons)

@nottinhill wrote:

Is there a best-practice to handle different image size for different target resolutions, e.g. backgrounds, huge icons, etc...

Is this done via media-selectors in Ionic2 and would you scale this or better let the Design agency provide 3-4 different sized icons?

Posts: 1

Participants: 1

Read full topic

Setting an option to selected="true" does not set value

@wgoldstein wrote:

Using this code:

  <ion-item>
    <ion-label floating>Payment Frequency</ion-label>
    <ion-select #planPayFreq (change)="elementChanged(planPayFreq)"
      formControlName="planPayFreq" [(ngModel)]="ongoingPlansForm.planPayFreq" multiple="false">
      <ion-option value="1"  selected="true">Annual</ion-option>
      <ion-option value=".08333333">Monthly</ion-option>
    </ion-select>
  </ion-item>

I would expect that Annual, or the first option, would be selected upon load. This does happen, but when you try to do an *ngIf="ongoingPlansForm.planPayFreq == 1", it fails because the value is not set as 1 for this select. When inspecting the element on load (before I select anything it looks like:

<ion-select formcontrolname="planPayFreq" multiple="false" ng-reflect-multiple="false" ng-reflect-name="planPayFreq" class="ng-untouched ng-pristine ng-invalid">

And after selecting Annual as an option, it changes to:

<ion-select formcontrolname="planPayFreq" multiple="false" ng-reflect-multiple="false" ng-reflect-name="planPayFreq" class="ng-touched ng-dirty ng-valid" ng-reflect-model="1">

And now the *ngif works fine.

Is this a bug with the selected="true" property?

Posts: 2

Participants: 1

Read full topic

Viewing all 70870 articles
Browse latest View live


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