Posts

loader

https://www.youtube.com/watch?v=dPUmskG_-y0

How to manage dynamic menu item in ionic?

App.component.ts this .loginState = brokerUser.loginState; /* True or false value assigned based on login */ this .accountMenuItems = [ {title: 'My Account' , component: MyAccountPage, icon: 'ios-contact' }, {title: 'Logout' , component: WelcomePage, icon: 'log-out' }, ]; this .loginMenuItems = [ {title: 'Login' , component: LoginPage, icon: 'ios-contact' } ]; App.html < ion-list * ngIf = "loginState == true" > < ion-list-header > Account </ ion-list-header > < button menuClose ion-item * ngFor = "let menuItem of accountMenuItems" ( click )= "openPage(menuItem)" > < ion-icon item-left [ name ]= "menuItem.icon" > </ ion-icon > {{menuItem.title}} </ button > </ ion-list > < ion-list * ngIf = "loginState == f...

all important links in angular and php

https://stackoverflow.com/questions/43630445/how-to-convert-current-date-to-yyyy-mm-dd-format-with-angular-2/43630504 https://stackoverflow.com/questions/43985752/how-to-reload-page-with-angular-2/43986110 https://stackoverflow.com/questions/12991351/css-force-image-resize-and-keep-aspect-ratio https://stackoverflow.com/questions/44190107/angular-2-binding-same-click-event-to-multiple-elements https://stackoverflow.com/questions/45797837/ionic-3-slides-component-implement-next-and-previous-button https://forum.ionicframework.com/t/ion-slides-options-is-deprecated/76357/3 https://stackoverflow.com/questions/47680612/ionic-3-image-slider-stops-autoplay-after-manual-sliding https://stackoverflow.com/questions/46074055/angular-how-to-show-an-input-based-on-dropdown-option https://stackoverflow.com/questions/51009331/select-default-option-value-from-typescript-angular-6

ionic-img-viewer

npm install --save ionic-img-viewer < img   src = " IMAGE_URL "  # myImage  ( click )= " presentImage(myImage) "  /> import   {   ImageViewerController   }   from   ' ionic-img-viewer ' ; export   class   MyPage   {    _imageViewerCtrl :   ImageViewerController ;    constructor ( imageViewerCtrl :   ImageViewerController )   {      this . _imageViewerCtrl   =   imageViewerCtrl ;    } presentImage ( myImage )   {      const   imageViewer   =   this . _imageViewerCtrl . create ( myImage ) ;      imageViewer . present () ;      setTimeout ( ( )   =>   imageViewer . dismiss () ,   1000 ) ;      imageViewer . onDidDismiss ( ( )   =>   alert ( ' Viewer dismissed ' )) ;    } }

inspect chrome

chrome://inspect/#devices

change root user in ubuntu

Run  sudo <command>  and type in your login password, if prompted, to run only that instance of the command as root. Next time you run another or the same command without the  sudo  prefix, you will not have root access. Run  sudo -i . This will give you an interactive root shell. Note that the  $  at the end of your prompt has changed to a  # , indicating that you have root access. From here you can run any sequence of commands as root, or run the command  exit  to leave the root shell. Use the  su  (substitute user) command to get a root shell. This is effectively the same as using  sudo -i . Note that when you use this command it will ask for the root password and not your login password. These are not the same. You may have to set or change the root password by running  sudo passwd root  first. Run  sudo -s . This gives you root access, but maintains your current SHELL. Shell specific s...

SHOW HIDE PASSWORD IN IONIC3

login.html <ion-item>  <ion-label floating>Password</ion-label>  <ion-input type="{{type}}" name="password" ngModel #password="ngModel" required pattern=".{4,10}"></ion-input>  <button *ngIf="!showPass" ion-button clear color="dark" type="button" item-right (click)="showPassword()"> <ion-icon name="ios-eye-off-outline"></ion-icon></button>  <button *ngIf="showPass" ion-button clear color="dark" type="button" item-right (click)="showPassword()"> <ion-icon name="ios-eye-outline"></ion-icon></button> </ion-item> login.ts export class AuthenticPage {   public type = 'password';   public showPass = false;   showPassword() {     this.showPass = !this.showPass;     if(this.showPass){       this.type = 'text';     }...