File tree Expand file tree Collapse file tree 7 files changed +60
-7
lines changed
Expand file tree Collapse file tree 7 files changed +60
-7
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { CostModule } from "./tabs/cost/cost.module";
88import { TabsComponent } from "./tabs/tabs.component" ;
99import { CostsComponent } from "./tabs/cost/costs.component" ;
1010import { LoginComponent } from "./login/login.component" ;
11+ import { RegisterComponent } from "./register/register.component" ;
1112
1213@NgModule ( {
1314 bootstrap : [
@@ -22,7 +23,8 @@ import { LoginComponent} from "./login/login.component";
2223 AppComponent ,
2324 TabsComponent ,
2425 CostsComponent ,
25- LoginComponent
26+ LoginComponent ,
27+ RegisterComponent
2628 ] ,
2729 providers : [
2830 ] ,
Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ import { CostsComponent } from "./tabs/cost/costs.component";
77import { CostDetailComponent } from "./tabs/cost/detail/cost-detail.component" ;
88import { CostEditComponent } from "./tabs/cost/edit/cost-edit.component" ;
99import { LoginComponent } from "./login/login.component" ;
10+ import { RegisterComponent } from "./register/register.component" ;
1011
1112const routes : Routes = [
1213 { path : "" , component : LoginComponent } ,
1314 { path : 'tabs' , component : TabsComponent } ,
15+ { path : 'register' , component : RegisterComponent } ,
1416 //{ path: "costs", component: CostsComponent },
1517 { path : "cost/:id" , component : CostDetailComponent } ,
1618 { path : "cost-edit/:id" , component : CostEditComponent }
Original file line number Diff line number Diff line change 1111 < Label text ="Password " class ="label font-weight-bold m-b-5 "> </ Label >
1212 < TextField secure ="true "> </ TextField >
1313 </ StackLayout >
14- < Button class =" btn-login " text =" Login " (tap) ="login() "> </ Button >
14+ < Button text =" Login " class =" btn-login " (tap) ="login() "> </ Button >
1515 < Label [nsRouterLink] ="['/register'] " text ="Not a member? Register here. " class ="text-center footnote "> </ Label >
1616</ StackLayout >
Original file line number Diff line number Diff line change @@ -19,11 +19,7 @@ export class LoginComponent implements OnInit {
1919 }
2020 }
2121
22- public ngOnInit ( ) {
23- //if(ApplicationSettings.getBoolean("authenticated", false)) {
24- // this.router.navigate(["/secure"], { clearHistory: true });
25- //}
26- }
22+ public ngOnInit ( ) { }
2723
2824 public login ( ) {
2925 this . router . navigate ( [ "/tabs" ] , { clearHistory : true } ) ;
Original file line number Diff line number Diff line change 1+ .register-view
2+ {
3+ padding-left : 50 ;
4+ padding-right : 50 ;
5+ }
6+
7+ .btn-register
8+ {
9+ background-color : # 7ada2f ;
10+ color : aliceblue;
11+ }
Original file line number Diff line number Diff line change 1+ < ActionBar title ="Register " class ="action-bar ">
2+ </ ActionBar >
3+
4+ < StackLayout verticalAlignment ="center " class ="register-view " >
5+ < Label text ="Name " class ="label font-weight-bold m-b-5 "> </ Label >
6+ < TextField > </ TextField >
7+ < Label text ="Surname " class ="label font-weight-bold m-b-5 "> </ Label >
8+ < TextField > </ TextField >
9+ < Label text ="Login " class ="label font-weight-bold m-b-5 "> </ Label >
10+ < TextField > </ TextField >
11+ < Label text ="Email " class ="label font-weight-bold m-b-5 "> </ Label >
12+ < TextField > </ TextField >
13+ < Label text ="Password " class ="label font-weight-bold m-b-5 "> </ Label >
14+ < TextField secure ="true "> </ TextField >
15+ < Button [nsRouterLink] ="[''] " text ="Register " class ="btn-register "> </ Button >
16+ </ StackLayout >
Original file line number Diff line number Diff line change 1+ import { Component , OnInit } from "@angular/core" ;
2+ import { RouterExtensions } from "nativescript-angular/router" ;
3+ import * as ApplicationSettings from "application-settings" ;
4+
5+ @Component ( {
6+ moduleId : module . id ,
7+ selector : "ns-register" ,
8+ templateUrl : "register.component.html" ,
9+ styleUrls : [ "register.component.css" ]
10+ } )
11+ export class RegisterComponent implements OnInit {
12+
13+ public input : any ;
14+
15+ public constructor ( private router : RouterExtensions ) {
16+ this . input = {
17+ "name" : "" ,
18+ "surname" : "" ,
19+ "login" : "" ,
20+ "email" : "" ,
21+ "password" : "" ,
22+ }
23+ }
24+
25+ public ngOnInit ( ) { }
26+ }
You can’t perform that action at this time.
0 commit comments