Commit adfcfab3 authored by mohan122's avatar mohan122

intial_update

parents
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>Hello Ionic</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<h3>Welcome to your first Ionic app!</h3>
<p>
This starter project is our way of helping you get a functional app running in record time.
</p>
<p>
Follow along on the tutorial section of the Ionic docs!
</p>
<p>
<button ion-button color="primary" menuToggle>Toggle Menu</button>
</p>
</ion-content>
page-hello-ionic {
}
import { Component } from '@angular/core';
@Component({
selector: 'page-hello-ionic',
templateUrl: 'hello-ionic.html'
})
export class HelloIonicPage {
constructor() {
}
}
<!--
Generated template for the HomePage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>home</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { HomePage } from './home';
@NgModule({
declarations: [
HomePage,
],
imports: [
IonicPageModule.forChild(HomePage),
],
})
export class HomePageModule {}
page-home {
}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, ToastController } from 'ionic-angular';
import {AngularFireAuth} from 'angularfire2/auth';
/**
* Generated class for the HomePage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-home',
templateUrl: 'home.html',
})
export class HomePage {
constructor(public navCtrl: NavController, public navParams: NavParams,private fire:AngularFireAuth,private toast:ToastController) {
}
ionViewWillLoad() {
this.fire.authState.subscribe(user=>{
if(user && user.email && user.uid){
this.toast.create({
message:'Successfully logged into Digimart',
duration:3000
}).present();
}
else{
this.toast.create({
message:'User name or Password not matched',
duration:3000
}).present();
}
})
}
}
<ion-header>
<ion-navbar>
<button menuToggle *ngIf="!selectedItem">
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>Item Details</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<h3 text-center *ngIf="selectedItem">
{{selectedItem.title}}
<ion-icon [name]="selectedItem.icon"></ion-icon>
</h3>
<h4 text-center *ngIf="selectedItem">
You navigated here from <b>{{selectedItem.title}}</b>
</h4>
</ion-content>
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
@Component({
selector: 'page-item-details',
templateUrl: 'item-details.html'
})
export class ItemDetailsPage {
selectedItem: any;
constructor(public navCtrl: NavController, public navParams: NavParams) {
// If we navigated to this page, we will have an item available as a nav param
this.selectedItem = navParams.get('item');
}
}
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>My First List</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<ion-list>
<button ion-item *ngFor="let item of items" (click)="itemTapped($event, item)">
<ion-icon name="{{item.icon}}" item-left></ion-icon>
{{item.title}}
<div class="item-note" item-right>
{{item.note}}
</div>
</button>
</ion-list>
</ion-content>
page-list {
}
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { ItemDetailsPage } from '../item-details/item-details';
@Component({
selector: 'page-list',
templateUrl: 'list.html'
})
export class ListPage {
icons: string[];
items: Array<{title: string, note: string, icon: string}>;
constructor(public navCtrl: NavController, public navParams: NavParams) {
this.icons = ['flask', 'wifi', 'beer', 'football', 'basketball', 'paper-plane',
'american-football', 'boat', 'bluetooth', 'build'];
this.items = [];
for(let i = 1; i < 11; i++) {
this.items.push({
title: 'Item ' + i,
note: 'This is item #' + i,
icon: this.icons[Math.floor(Math.random() * this.icons.length)]
});
}
}
itemTapped(event, item) {
this.navCtrl.push(ItemDetailsPage, {
item: item
});
}
}
<ion-content padding id="login" class=" manual-remove-top-padding">
<div class="spacer" style="width: 300px; height: 20px;"></div>
<div style="margin-left: -20px; width: calc(100% + 40px);">
<img src="assets/imgs/848.jpg" class="logo" style="display: block; width: 100%; margin-left: auto; margin-right: auto; margin-top: 0px;" />
</div>
<ion-header>
<ion-navbar>
<ion-title>LOGIN</ion-title>
</ion-navbar>
</ion-header>
<div class="spacer" style="width: 50px; height: 0px;"></div>
<ion-card-content>
<ion-list>
<ion-item id="password" style="padding:0px;">
<ion-label floating>Email/Mobile no.</ion-label>
<ion-input type="Email" [(ngModel)]="user.email"></ion-input>
</ion-item>
<div class="spacer" style="width: 50px; height: 2px;"></div>
<ion-item id="password" style="position: relative; padding:0px;">
<ion-label floating>Password</ion-label>
<ion-input type="password" [(ngModel)]="user.password"></ion-input>
</ion-item>
</ion-list>
<div padding>
<button block ion-button color="vamsi" style="padding:0px; width: 100%;" medium (click)="login(user)">Sign In</button>
<div class="spacer" style="width: 50px; height: 10px;"></div>
<button block ion-button color="light" medium (click)="Register()">Register</button>
</div>
</ion-card-content>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { LoginPage } from './login';
@NgModule({
declarations: [
LoginPage,
],
imports: [
IonicPageModule.forChild(LoginPage),
],
})
export class LoginPageModule {}
page-login {
#login {
background: color($colors, white);
}
#password {
background: color($colors, white);
width: 95%;
}
}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams ,AlertController} from 'ionic-angular';
import {User} from '../../models/user';
import {AngularFireAuth } from 'angularfire2/auth';
import { HomePage } from '../home/home';
import { RegisterPage } from '../register/register';
@IonicPage()
@Component({
selector: 'page-login',
templateUrl: 'login.html',
})
export class LoginPage {
user={} as User;
constructor(public navCtrl: NavController, public navParams: NavParams,private fire:AngularFireAuth,private alertctrl:AlertController) {
}
alert(message:string){
this.alertctrl.create({
title: 'Alert',
subTitle: message,
buttons: ['OK']
}).present();
}
login(user:User){
this.fire.auth.signInWithEmailAndPassword(this.user.email,this.user.password)
.then(data =>{
this.navCtrl.setRoot(HomePage);
})
.catch(error=>{
this.navCtrl.setRoot(LoginPage);
this.alert('Username and Password not match');
})
}
Register() {
this.navCtrl.push(RegisterPage);
}
ionViewDidLoad() {
console.log('ionViewDidLoad SplashPage');
}
}
<!--
Generated template for the PloginPage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-content padding id="login" class=" manual-remove-top-padding">
<div class="spacer" style="width: 300px; height: 20px;"></div>
<div style="margin-left: -20px; width: calc(100% + 40px);">
<img src="assets/imgs/SHOOP.jpg" class="logo" style="display: block; width: 100%; margin-left: auto; margin-right: auto; margin-top: 0px;" />
</div>
<ion-header>
<ion-navbar>
<ion-title>LOGIN</ion-title>
</ion-navbar>
</ion-header>
<div class="spacer" style="width: 50px; height: 0px;"></div>
<ion-card-content>
<ion-list>
<ion-item id="password" style="padding:0px;">
<ion-label floating>Email/Mobile no.</ion-label>
<ion-input type="Email"></ion-input>
</ion-item>
<div class="spacer" style="width: 50px; height: 2px;"></div>
<ion-item id="password" style="position: relative; padding:0px;">
<ion-label floating>Password</ion-label>
<ion-input type="password"></ion-input>
</ion-item>
</ion-list>
<div padding>
<button block ion-button color="vamsi" style="padding:0px; width: 100%;" medium>Sign In</button>
<div class="spacer" style="width: 50px; height: 10px;"></div>
<button block ion-button color="light" medium (click)="Register()">Register</button>
</div>
</ion-card-content>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { PloginPage } from './plogin';
@NgModule({
declarations: [
PloginPage,
],
imports: [
IonicPageModule.forChild(PloginPage),
],
})
export class PloginPageModule {}
page-plogin {
#login {
background: color($colors, white);
}
#password {
background: color($colors, white);
width: 95%;
}
}
\ No newline at end of file
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { RegisterPage } from '../register/register';
/**
* Generated class for the PloginPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-plogin',
templateUrl: 'plogin.html',
})
export class PloginPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
Register() {
this.navCtrl.push(RegisterPage);
}
ionViewDidLoad() {
console.log('ionViewDidLoad PloginPage');
}
}
<ion-header>
<ion-navbar>
<ion-title>REGISTER</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding id="register">
<ion-list>
<ion-item id="password" style="padding:0px;">
<ion-label floating>NAME</ion-label>
<ion-input type="Email" #username></ion-input>
</ion-item>
<ion-item id="password" style="position: relative; padding:0px;">
<ion-label floating>Phone no.</ion-label>
<ion-input type="text"></ion-input>
</ion-item>
<ion-item id="password" style="position: relative; padding:0px;">
<ion-label floating>Password</ion-label>
<ion-input type="password" #password></ion-input>
</ion-item>
<ion-item id="password" style="position: relative; padding:0px;">
<ion-label floating>Re-type Password</ion-label>
<ion-input type="password"></ion-input>
</ion-item>
<ion-item id="password" style="position: relative; padding:0px;">
<ion-label floating>Name of the Shop</ion-label>
<ion-input type="text"></ion-input>
</ion-item>
<p> Location:{{ location?.coords.latitude}}/ {{ location?.coords.longitude }}</p>
</ion-list>
<div padding>
<button block ion-button color="vamsi" style="padding:0px; width: 100%;" medium (click)="registerUser()">Sign Up</button>
</div>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { RegisterPage } from './register';
@NgModule({
declarations: [
RegisterPage,
],
imports: [
IonicPageModule.forChild(RegisterPage),
],
})
export class RegisterPageModule {}
page-register {
#register{
background:color($colors,light);
}
#password{
background:color($colors,light);
width:95%;
}
}
import { IonicPage, NavController, NavParams ,Platform} from 'ionic-angular';
import { AngularFireAuth } from 'angularfire2/auth';
import { Component ,ViewChild } from '@angular/core';
import { Geolocation } from '@ionic-native/geolocation';
/**
* Generated class for the RegisterPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-register',
templateUrl: 'register.html',
})
export class RegisterPage {
@ViewChild('username') user;
@ViewChild('password') password;
location:any;
constructor(private fire: AngularFireAuth,public navCtrl: NavController, public navParams: NavParams,private geolocation: Geolocation,public platform:Platform) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad RegisterPage');
}
registerUser() {
this.fire.auth.createUserWithEmailAndPassword(this.user.value,this.password.value)
.then(data=> {
console.log('got data',data);
}
)
.catch(error=>{
console.log('got error',error);
});
this.platform.ready().then(()=>{
let options={timeout:100,enableHighAccuracy:true,maximumAge:0}
this.geolocation.getCurrentPosition(options).then((location) => {
console.log('Fetched the location successfully',location);
this.location=location;
}).catch((error) => {
console.log('Error getting location', error);
});
});
}
}
<!--
Generated template for the RetloginPage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<div id="custom-overlay" [style.display]="splash ? 'flex':'none'">
<div class="flb">
<div class="Aligner-item Aligner-item--top"></div>
<img src="assets/imgs/LOGO.png">
<div class="Aligner-item Aligner-item--bottom"></div>
</div>
</div>
<ion-content padding id="login" class=" manual-remove-top-padding">
<div class="spacer" style="width: 300px; height: 1px;"></div>
<div style="margin-left: -20px; width: calc(100% + 40px);">
<img src="assets/imgs/SHOOP.jpg" class="logo" style="display: block; width: 100%; margin-left: auto; margin-right: auto; margin-top: -40px;" />
</div>
<ion-content padding>
<div padding>
<button block ion-button color="vamsi" style="padding:0px; width: 100%;" medium (click)="PLogin()">RETAILER</button>
<div class="spacer" style="width: 50px; height: 10px;"></div>
<button block ion-button color="vamsi" medium (click)="Login()">PURCHASER</button>
</div>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { RetloginPage } from './retlogin';
@NgModule({
declarations: [
RetloginPage,
],
imports: [
IonicPageModule.forChild(RetloginPage),
],
})
export class RetloginPageModule {}
page-retlogin {
}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { LoginPage} from '../login/login';
import { PloginPage} from '../plogin/plogin';
/**
* Generated class for the RetloginPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-retlogin',
templateUrl: 'retlogin.html',
})
export class RetloginPage {
splash=true;
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
PLogin() {
this.navCtrl.push(PloginPage);
}
Login(){
this.navCtrl.push(LoginPage);
}
ionViewDidLoad() {
setTimeout(()=>{
this.splash=false;
},4500);
console.log('ionViewDidLoad RetloginPage');
}
}
<div id="custom-overlay" [style.display]="splash ? 'flex':'none'">
<div class="flb">
<div class="Aligner-item Aligner-item--top"></div>
<img src="assets/imgs/LOGO.png">
<div class="Aligner-item Aligner-item--bottom"></div>
</div>
</div>
<ion-header>
<ion-navbar>
<ion-title>splash</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { SplashPage } from './splash';
@NgModule({
declarations: [
SplashPage,
],
imports: [
IonicPageModule.forChild(SplashPage),
],
})
export class SplashPageModule {}
This diff is collapsed.
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the SplashPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-splash',
templateUrl: 'splash.html',
})
export class SplashPage {
splash=true;
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
setTimeout(()=>{
this.splash=false;
},4000);
console.log('ionViewDidLoad SplashPage');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment