Ionic scroll area extends beyond the screen boundaries - html

I have a page that I am trying to split into two sections using Ionic elements etc.: The top section is fixed, and has a set number of items that will not change, and the bottom section should be a scroll-able list.
Also, I want to use an ion-refresher for the entire screen (of course if the user were to try and pull down on the bottom section, this would just scroll through that section..)
The problem I have is that when using an ion-scroll element for the bottom section, the scroll-able area extends beyond the bottom of the screen which means the bottom elements of the list are never view-able. Why is this?
Code:
<ion-content overflow-scroll="false">
<ion-refresher
pulling-text="Pull to refresh..."
ion-refresh="refresh()">
</ion-refresher>
<ion-list>
<ion-item class="item item-icon-left" href="#/somewhere">
<i class="icon ion-icon"></i> Content
<span class="badge badge-assertive>1</span>
</ion-item>
<ion-item class="item item-icon-left" href="#/somewhere">
<i class="icon ion-icon"></i> Content
<span class="badge badge-assertive">2</span>
</ion-item>
<ion-item class="item item-icon-left" href="#/somewhere">
<i class="icon ion-icon"></i> Content
<span class="badge badge-assertive">3</span>
</ion-item>
</ion-list>
<div id="myDivider" class="item-divider">
<i class="icon ion-icon"></i> I'm a divider
</div>
<ion-scroll id=myBottomScroll">
<ion-list>
<ion-item ng-repeat="item in myItems"
class="item" href="#/somewhere/{{item.id}}">
<i class="icon ion-icon"></i>
<i class="icon ion-icon"></i> {{alert.What}}
<i class="icon ion-icon" style="float: right"></i>
</ion-item>
</ion-list>
</ion-scroll>
</ion-content>

Related

dynamically add or remove buttons alignment in form

I have a small form designed but it is misaligned. I am trying to align properly but not sure why its becoming so messy. The problem with the design is when i click on plus button the below things happen:
The blue color content right side gets increased and in turn it adds extra space vertically which is messy. I want the blue color content to be at fixed height.
The minus button needs to be placed properly beside its corresponding line.
Also the plus button should be aligned properly.
Can anyone help me out on this.
The below is my code:
<div class="row">
<div class="col-md-8">
<mat-dialog-content class="mat-typography">
<section *ngFor="let address of endpointsBulk; let i = index;">
<div class="row">
<div>
<!-- <h4>Endpoint {{i + 1}}</h4> -->
</div>
<div class="text-right" *ngIf="endpointsBulk.length > minEndpoints">
<button mat-button color="danger" (click)="removeEndpointForm(i)">
<i class="fa fa-minus" aria-hidden="true"></i>
</button>
</div>
</div>
<div class="row">
<div>
<mat-form-field class="example-full-width">
<mat-label>Choose Method</mat-label>
<mat-select [(ngModel)]="address.method">
<mat-option value="post">POST</mat-option>
<mat-option value="get">GET</mat-option>
<mat-option value="put">PUT</mat-option>
<mat-option value="delete">DELETE</mat-option>
</mat-select>
</mat-form-field>
</div>
<div>
<mat-form-field class="example-full-width">
<input name="search" id="search" [(ngModel)]="address.endpoint" matInput type="search"
placeholder="Endpoint">
</mat-form-field>
</div>
</div>
</section>
<div class="text-right" *ngIf="endpointsBulk.length < maxEndpoints">
<button mat-button color="primary" (click)="addEndpoinForm();">
<i class="fa fa-plus" aria-hidden="true"></i>
</button>
</div>
</mat-dialog-content>
</div>
<div class="col-md-4 callout callout-info no-margin">
<li>Format: post:/api/v1/addAccount/id
<br> Usage :
<ul>
<li>post:/api/v1/addAccount/id</li>
<li>get:/api/v1/getAccount/id</li>
<li>put:/api/v1/updateAccount/id</li>
<li>delete:/api/v1/deleteAccount/id</li>
</ul>
</li>
</div>
</div>
<mat-dialog-actions class="pull-right" align='end'>
<button mat-raised-button class="nav-btn text-primary" type="submit" [disabled]="checkFormValidity()"
(click)="saveEndPoint()">Save</button>
<button mat-raised-button class="nav-btn text-primary" (click)="dialogRef.close()">Cancel</button>
</mat-dialog-actions>
The design is something like below:
You can limit the height of the right side with height: fit-content;
You seem to be putting each element (minus, form) inside a separate row, try using columns instead if you want them next to each other
The alignment of plus is just a matter of putting it in a correct container, please specify what is "aligned properly"

When hover on project,display options to edit, delete or copy icons

Hello i have problem i don't know how to do if I hover on project to show me icons for edit delete or copy.
Here you have my html code.
<button button class="vp-button" (click)="opentestdialog()">Add Something
</button>
<button button class="vp-button" (click)="showProject()">Show projects
</button>
<mat-list>
<mat-list-item *ngFor="let project of projects$ | async; let i = index;">
<div class="icon"><span class="fa fa-spinner"></span></div>
<div class="fa fa-edit clickable edit-icon" (click)="editProject()"></div>
<div class="fa fa-trash-o clickable delete-icon" (click)="deleteProject(project)"></div>
<div class="fa fa-files-o clickable copy-item" (click)="copyProject(project)"></div>
<div class="fa fa-pencil fa-fw" (click)="openprojecteditdialog(project)"></div>
<div *ngIf="!isInputVisible"><td>{{project.name}}</td></div>
<input [(ngModel)]="project.name" *ngIf="isInputVisible">
<button button class="vp-button" (click)="onSave(project)" *ngIf="isInputVisible">Save</button>
<button button class="vp-button" (click)="onCancel()" *ngIf="isInputVisible">Cancel</button>
</mat-list-item>
</mat-list>

How to use ion-tabs inside a div

I am working on ionic1 and angularjs I have already worked with tabs but now I am facing an issues where my tabs should be appear only in a particular div so on the particular area of my html page only my ion-tabs should work but it is not displaying well as we i am expected.
here is my .html page
<ion-modal-view>
<div class="bar bar-header bar-calm">
<button class="button icon ion-navicon"></button>
<h1 class="title">Happy Home</h1>
<button class="button" ng-click="closeLogout()">LogOut</button>
</div>
<ion-content>
<div class = "row responsive-sm" style = "padding-top:50px">
<div class = "col">
<label class="item item-input item-select">
<br>
<select>
<option>B09-301</option>
<option selected>G45-94</option>
<option>R8910</option>
</select>
</label>
</div>
</div>
<div style="background-color: #DEE0E0">
<div class = "row">
<div class = "col-33">
<div class="card">
<div class="item item-text-avatar" style="background-color: #11C1F3">
<i class="icon ion-ios-home item-floating-label" ></i>
MEMBERS
</div>
</div>
</div>
<div class = "col-33">
<div class="card">
<div class="item item-text-avatar" style="background-color: #11C1F3">
<i class="icon ion-model-s item-floating-label"></i>
Vechical
</div>
</div>
</div>
<div class = "col-33">
<div class="card">
<div class="item item-text-avatar" style="background-color: #11C1F3">
<i class="icon ion-ios-bookmarks item-floating-label"></i>
Booking
</div>
</div>
</div>
</div>
<div class ="row">
<div class = "col col-top">
<div class="card">
<div class="item item-text-avatar" style="background-color: #11C1F3">
<i class="icon ion-person-stalker item-floating-label"></i>
Staff
</div>
</div>
</div>
<div class = "col col-top">
<div class="card">
<div class="item item-text-avatar" style="background-color: #11C1F3">
<i class="icon ion-ios-home-outline item-floating-label"></i>
Visitor
</div>
</div>
</div>
</div>
</div>
<div class = "row">
<ion-tabs class="tabs-striped tabs-top tabs-background-positive tabs-color-light">
<ion-tab title="MyDues">
<ion-content>
<h1>happy home Dues</h1>
</ion-content>
</ion-tab>
<ion-tab title="Deposite">
<ion-content>
<h1>happy home Deposite</h1>
</ion-content>
</ion-tab>
<ion-tab title="Advance">
<ion-content>
<h1>happy home Advance</h1>
</ion-content>
</ion-tab>
<ion-tab title="History">
<ion-content>
<h1>happy home History</h1>
</ion-content>
</ion-tab>
</ion-tabs>
</div>
</ion-content>
Here you can see the ion-tabs where i have implemented the tabs div
and here is the sample image where i should use ion-tabs help me if some one know how to use the ion-tabs for my MY DUES,ADVANCE,DEPOSIT,HISTORY.
THANK YOU,
Put inside of <div> and add this css to this div
width: 100%;
position: fixed;
Working for me
I am working on ionic 3, I got this way, I put the tab inside ion-content and works for me.
<ion-content>
<ion-card>
<ion-row fixed padding>
<ion-col>
<h2 class="card-titulo"> Localidade</h2>
<h2 class="card-titulo"> Data Início</h2>
</ion-col>
<ion-col>
<h2 class="card-descricao">
<ion-icon name="pin"></ion-icon>
Fortaleza-CE
</h2>
<h2 class="card-descricao">
<ion-icon name="calendar"></ion-icon>
24/01/18 10:47
</h2>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-item>
<ion-label>Clima</ion-label>
<ion-select [(ngModel)]="clima">
<ion-option>Frio</ion-option>
<ion-option>quente</ion-option>
</ion-select>
</ion-item>
</ion-col>
<ion-col>
<ion-item>
<ion-label>Equipamento</ion-label>
<ion-select [(ngModel)]="equipamento">
<ion-option>Medidor</ion-option>
<ion-option>Equipament teste</ion-option>
</ion-select>
</ion-item>
</ion-col>
</ion-row>
</ion-card>
<ion-content>
<tabs-obra></tabs-obra>
</ion-content>
<ion-fab bottom right>
<button ion-fab mini (click)="abrirListaAtividade()">
<ion-icon name="checkmark"></ion-icon>
</button>
</ion-fab>

Ionic Side menu with sub menu

Need to create test 1 2 3 4 belongs to the header menu of Test
How to create mobile Side menu with sub menu in ionic framework?
<ion-list>
<ion-item menu-close-keep-history href="#/app/profile" class="item-icon-left">
<i class="icon ion-ios-home"></i> Test
</ion-item>
<ion-item menu-close-keep-history href="#/app/assignedtasks" class="item-icon-left">
<i class="icon ion-ios-paper"></i>
test 1
</ion-item>
<ion-item menu-close-keep-history href="#/app/requirements" class="item-icon-left">
<i class="icon ion-ios-paper"></i>
test 2
</ion-item>
<ion-item menu-close-keep-history href="#/app/machinery" class="item-icon-left">
<i class="icon ion-ios-paper"></i>
test 3
</ion-item>
<ion-item menu-close-keep-history href="#/app/chat" class="item-icon-left">
<i class="icon ion-ios-people"></i>
test 4
</ion-item>
<ion-item menu-close-keep-history href="#/app/settings" class="item-icon-left">
<i class="icon ion-ios-gear"></i>
Settings
</ion-item>
<ion-item menu-close-keep-history href="#/app/logout" class="item-icon-left">
<i class="icon ion-ios-locked"></i>
Logout
</ion-item>
</ion-list>

HTML entities get encoded twice with dynamic binding

how do id encode/decode html in ionic framework
below is my code.
<ion-view view-title="Products">
<ion-content class="padding">
<div class="list">
<div class="card" ng-repeat="item in products">
<a class="item item-avatar" on-tap="productDetails(item.ProductId)">
<h2>{{item.Name}}</h2>
<p>Price {{item.Prices[0].Value}}</p>
<p>{{item.Description}}</p>
</a>
<a class="item item-image" on-tap="productDetails(item.ProductId)">
<img ng-src="{{item.ImageUrl}}"/>
</a>
<!--<div class="item item-icon-left energized" >-->
<div class="button-bar">
<div class="button button-clear energized" ng-click='addToCart(item.ProductId);' style="font-size:80%;">
<i class="icon ion-ios-cart"></i>
Add To cart
</div>
<div class="button button-clear energized" on-tap="productDetails(item.ProductId)" style="font-size:80%;">
<i class="icon ion-eye"></i>
View More
</div>
</div>
<!--</div> -->
</div>
</div>
</ion-content>
when I tried to fatch my record from product and
it is encoding
therefore browser is showing like the below image
And the value store in salesforce product2 object is
"Pacifique - Bora Bora Pearl Beach Resort & Spa - Polynésie française"
Use
<h2 ng-bind-html-unsafe="item.Name"></h2>
The documentation can be found here
There is a working plunkr -> http://plnkr.co/edit/dOzvvNcaLjd9CsKzyIY0?p=preview