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";
8
8
import { TabsComponent } from "./tabs/tabs.component" ;
9
9
import { CostsComponent } from "./tabs/cost/costs.component" ;
10
10
import { LoginComponent } from "./login/login.component" ;
11
+ import { RegisterComponent } from "./register/register.component" ;
11
12
12
13
@NgModule ( {
13
14
bootstrap : [
@@ -22,7 +23,8 @@ import { LoginComponent} from "./login/login.component";
22
23
AppComponent ,
23
24
TabsComponent ,
24
25
CostsComponent ,
25
- LoginComponent
26
+ LoginComponent ,
27
+ RegisterComponent
26
28
] ,
27
29
providers : [
28
30
] ,
Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ import { CostsComponent } from "./tabs/cost/costs.component";
7
7
import { CostDetailComponent } from "./tabs/cost/detail/cost-detail.component" ;
8
8
import { CostEditComponent } from "./tabs/cost/edit/cost-edit.component" ;
9
9
import { LoginComponent } from "./login/login.component" ;
10
+ import { RegisterComponent } from "./register/register.component" ;
10
11
11
12
const routes : Routes = [
12
13
{ path : "" , component : LoginComponent } ,
13
14
{ path : 'tabs' , component : TabsComponent } ,
15
+ { path : 'register' , component : RegisterComponent } ,
14
16
//{ path: "costs", component: CostsComponent },
15
17
{ path : "cost/:id" , component : CostDetailComponent } ,
16
18
{ path : "cost-edit/:id" , component : CostEditComponent }
Original file line number Diff line number Diff line change 11
11
< Label text ="Password " class ="label font-weight-bold m-b-5 "> </ Label >
12
12
< TextField secure ="true "> </ TextField >
13
13
</ StackLayout >
14
- < Button class =" btn-login " text =" Login " (tap) ="login() "> </ Button >
14
+ < Button text =" Login " class =" btn-login " (tap) ="login() "> </ Button >
15
15
< Label [nsRouterLink] ="['/register'] " text ="Not a member? Register here. " class ="text-center footnote "> </ Label >
16
16
</ StackLayout >
Original file line number Diff line number Diff line change @@ -19,11 +19,7 @@ export class LoginComponent implements OnInit {
19
19
}
20
20
}
21
21
22
- public ngOnInit ( ) {
23
- //if(ApplicationSettings.getBoolean("authenticated", false)) {
24
- // this.router.navigate(["/secure"], { clearHistory: true });
25
- //}
26
- }
22
+ public ngOnInit ( ) { }
27
23
28
24
public login ( ) {
29
25
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