What is the process for placing the back button on the left side in Ionic?

I am working on a project with Ionic framework and I need to align the back button to the left in the header. Here is the code snippet:

<ion-header-bar class="bar-positive" align-title="left" >
<h1 class="title" style="text-align: center">More Info</h1>

<button  ng-click="myGoBack()" class="button  button-clear"> <i class="ion- chevron-left " ></i> Back </button>

</ion-header-bar>

  <ion-view>
 <ion-content >
<ion-list class="list-inset" style="margin-right: 1%;margin-right: 1%">
  <ion-item style="margin-right: 1%;margin-right: 1%" class="item-text-wrap" ng-init="missionDetail.getAllFicheMissionDetails(missionId,desId);">
    vehicule :{{payloadMissionDetail.vehicule}}
    Mission :{{payloadMissionDetail.mission}}
    Chau1 :{{payloadMissionDetail.ch}}
    Chau2 :{{payloadMissionDetail.ch2}}
    Départ :{{payloadMissionDetail.depart}}
  </ion-item>
</ion-list>

Answer №1

Feel free to utilize the code snippet provided below.

<ion-header-bar align-title="left" class="bar-positive">
  <div class="buttons">
<button class="button" ng-click="doSomething()">Left Button</button>
 </div>
 <h1 class="title">Title!</h1>
 <div class="buttons">
  <button class="button">Right Button</button>
 </div>
</ion-header-bar>

To learn more, refer to the official documentation: http://ionicframework.com/docs/api/directive/ionHeaderBar/

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The application of the template string expression is not carried out by $compile in the link function of a directive

I'm still learning AngularJs and running into a few issues with the code below. return { require: ['^myElement'], restrict: 'EA', replace: true, scope: true, link: function (scope, element, ...

Guide to configuring an Angular Material Footer using Flex-Layout

Could someone help me with setting up the footer in my Angular Material app? I want it to: stick to the bottom when the content height is smaller than the view-port move down or get pushed down when the content height exceeds the view-port One important ...

What is the reason for receiving HTTP headers in addition to non-HTML data when parsing a webpage in Java?

I have attempted various methods to extract data from the internet, but all of them end up pulling the header along with the file I'm trying to save: Take the following code for example: URL url; String webURL = "http://www.wunderground.com/history/ ...

Modifying the attributes/properties within a class of a bootstrap button

Here is the code that I have: <b-button id="search-button" size="md" class="mt-1 w-100" type="submit" @click="someEvent()" >Example </b-button If we imagine calling someEvent() and wanting to modi ...

Enhanced 'uib-tooltip-html' feature embedded in anchor element

Is there a way to display different tooltip messages depending on certain conditions? Below is the code snippet I have created for this purpose: <a ng-show="isManagedMeetingMandatory" ...

Utilize jQuery to show a specific section of the page based on the hash in the URL

So, the inspiration for this project stemmed from a common issue I encountered: After hitting the register button, the PHP script processes it and displays an error, but the page remains on the login form. Here's the visual representation of the i ...

Mobile Styling Needs Improvement: iOS 6 "Choose File" Button Size Concern

I am currently in the process of styling a couple of basic form pages that were originally created in ASP.NET for mobile devices. In order to enhance the display for mobile users, I am utilizing CSS3 media detection to identify when the device is mobile an ...

Tips for optimizing HTML (Jade template) to utilize *.min JavaScript and CSS files for production purposes

Utilizing Grunt for the compilation of jade templates into HTML, as well as uglifying/concatenating JS and minimizing/concatenating CSS. During the development process, I employ a combination of connect and watch to serve the front-end and automatically d ...

What is another option for object-fit: cover?

Is there a way to resize an image on my webpage while maintaining its aspect ratio based on the screen size? I want the smaller dimension (width or height) to fit exactly within the element, with the larger dimension overflowing. I came across the objec ...

Tips for filling in the values for the options in a select dropdown menu

Currently, I am facing a strange bug related to the select element. Whenever I open the dropdown, there is always a mysterious black option at the top. This is how my HTML looks like: This particular element is part of my test controller. <select ng- ...

Refresh PHP Calculator Display Once Results are Shown

Currently working on a basic calculator project coded in HTML, CSS, JS, and PHP. Here is a glimpse of it: The user input retrieval is handled by JS, while the actual calculations and result display are taken care of by PHP. I am striving to clear out the ...

What type of layout engine is used to determine the positioning of HTML elements on a webpage?

I am currently working on a web data classification project and I'm interested in obtaining the coordinates of HTML elements as they are displayed in a web browser, without considering any CSS or JavaScript present on the webpage. I primarily use C++ ...

Nav bar taking up full width of page, centered to the right with content area

I am facing an issue with aligning my full-width navbar with my fixed content area. The ul keeps changing based on the browser or resolution. Check out this fiddle for reference: http://jsfiddle.net/fwyNy/ subject site CSS Code: #topribbon{ width: 10 ...

Tips for passing parameters in a BootstrapDialog.show({ }) function popup

I am trying to display a popup using BootstrapDialog and pass a parameter with it. I have used the data attribute in my code snippet as shown below: BootstrapDialog.show({ closable: false, title: "This is my custom popup", message: $(' ...

Identify and apply a special effect to the initial input element within a popup using jQuery

I have a variety of popups containing multiple input fields. I am aiming to emphasize the initial input element of each of my popups, without the utilization of ids: This is my current code snippet: function initializePopups(){ $('*[id*=Popup]&a ...

Using jQuery to switch between different content divs

I'm trying to create a script that allows users to toggle between different posts, showing one at a time. However, I'm running into an issue where clicking on a new post doesn't hide the content of the previous one. How can I modify the code ...

Avoid loading external scripts from third-party sources such as JavaScript libraries, Bing Maps API, and Lighthouse performance tool

Issue: The Bing maps API I incorporated into my assignment is loading unnecessary CSS and scripts, causing a noticeable decrease in my lighthouse scores. Is there a way to prevent third-party code (such as Bing Ads) from loading when fetching the maps for ...

How can I activate a function or pass a selected value to a different scope variable using AngularUI Bootstrap Datepicker?

Check out this AngularUI Datepicker demo on Plunker: http://plnkr.co/edit/DWqgfTvM5QaO5Hs5dHco?p=preview I'm curious about how to store the selected value in a variable or trigger another function when a date is chosen in the field. I couldn't ...

Find your way to a unique div created through a while loop

Describing my issue clearly, I am using PHP to retrieve data from MySQL. The table contains multiple records. To display table records, I have implemented a while loop with mysqli_fetch_array() as the condition. These records need to be echoed out (in HT ...

The identification of the field is not being transmitted by ng-select

Looking for help with Angular! I have an ng-select box where I can choose countries, and it's working fine when I select an option and submit - it submits the id as expected. However, when pre-populating the ng-select with data and submitting, it&apos ...