Commit b03c3867 authored by Wosiek, Oliver's avatar Wosiek, Oliver
Browse files

Grundaufbau für Register

parent 661068c0
Pipeline #3334 passed with stage
in 3 minutes and 49 seconds
......@@ -12,8 +12,10 @@ class User extends Person {
// ggf persistente Daten von einer Service Routine
List<Contact> _contactlist = List();
User(String nickname, String surname, String name, String email)
: super(nickname, surname, name, email);
String password;
User(String nickname, String surname, String name, String email, String password)
: password = password, super(nickname, surname, name, email);
// Adds a single contact, no duplicate by contactcode
void addContact(Contact con) {
......
@import url('https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css');
\ No newline at end of file
import 'package:angular/angular.dart';
import 'package:angular_forms/angular_forms.dart';
import 'package:angular_router/angular_router.dart';
import 'package:demo/src/view/services/register_service.dart';
@Component(
selector: 'register',
templateUrl: 'register_component.html',
styleUrls: ['register_component.css'],
directives: [coreDirectives, routerDirectives, formDirectives],
)
class RegisterComponent implements OnInit {
RegisterComponent(this._registerService);
final RegisterService _registerService;
Future<void> register() async {
}
Future<void> cancel() async {
}
@override
void ngOnInit() async {
// do something when drawn
// like DB connections
}
}
\ No newline at end of file
<h1>Register</h1>
<form>
<div class="form-group">
<label for="nickname">Nickname</label>
<input type="text" class="form-control" id="nickname" required placeholder="Nickname">
</div>
<div class="form-group">
<label for="surname">Surname</label>
<input type="text" class="form-control" id="surname" placeholder="Surname">
</div>
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" id="name" placeholder="Name">
</div>
<div class="form-group">
<label for="name">Email</label>
<input type="text" class="form-control" id="email" required placeholder="Email">
</div>
<div class="form-group">
<label for="mobileNo">Mobile Number</label>
<input type="text" class="form-control" id="mobileNo" placeholder="Mobile Number">
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="text" class="form-control" id="password" placeholder="Password">
</div>
<button type="submit" class="btn btn-success" (click)="register()">Register</button>
<button type="button" class="btn btn-link" (click)="cancel()">Cancel</button>
</form>
\ No newline at end of file
......@@ -6,6 +6,7 @@ import 'package:demo/src/view/services/calendar_service.dart';
import 'package:demo/src/view/services/dashboard_service.dart';
import 'package:demo/src/view/services/dayview_service.dart';
import 'package:demo/src/view/services/sample_service.dart';
import 'package:demo/src/view/services/register_service.dart';
@Component(
......@@ -18,7 +19,8 @@ import 'package:demo/src/view/services/sample_service.dart';
ClassProvider(DashboardService),
ClassProvider(AppointmentService),
ClassProvider(CalendarService),
ClassProvider(DayviewService)
ClassProvider(DayviewService),
ClassProvider(RegisterService)
],
exports: [RoutePaths, Routes],
)
......
......@@ -21,6 +21,9 @@
<li [routerLink]="RoutePaths.calendarMain.toUrl()"
[routerLinkActive]="'active'">Calendar
</li>
<li [routerLink]="RoutePaths.register.toUrl()"
[routerLinkActive]="'active'">Register
</li>
</nav>
</div>
......
......@@ -16,6 +16,7 @@ class RoutePaths {
static final RoutePath calendarMain = RoutePath(path: 'calendar');
static final RoutePath calendar = RoutePath(path: '${calendarMain.path}/:$yParam/:$mParam');
static final RoutePath dayview = RoutePath(path: '${calendarMain.path}/:$yParam/:$mParam/:$dParam');
static final RoutePath register = RoutePath(path: 'register');
}
......
......@@ -4,8 +4,10 @@ import '../components/appointment_list_component.template.dart' as appointment_l
import '../components/appointment_new_component.template.dart' as appointment_new_template;
import '../components/calendar_main.template.dart' as calendar_template;
import '../components/dashboard_component.template.dart' as dashboard_template;
import '../components/sample_component.template.dart' as sample_template;
import '../components/dayview_component.template.dart' as dayview_template;
import '../components/register_component.template.dart' as register_template;
import '../components/sample_component.template.dart' as sample_template;
import 'route_paths.dart';
......@@ -46,6 +48,11 @@ class Routes {
routePath: RoutePaths.dayview,
component: dayview_template.DayviewComponentNgFactory,
);
static final RouteDefinition register = RouteDefinition(
routePath: RoutePaths.register,
component: register_template.RegisterComponentNgFactory,
);
// routing auf diese Component
static final List<RouteDefinition> all = <RouteDefinition>[
sample,
......@@ -56,6 +63,7 @@ class Routes {
calendarMain,
calendar,
dayview,
register,
RouteDefinition.redirect(
path: '',
redirectTo: RoutePaths.dashboard.toUrl(),
......
import 'package:http/http.dart';
class RegisterService {
RegisterService(this._http);
static final _headers = {'Content-Type': 'application/json'};
static const _registerUrl = 'http://localhost:8080/#/register'; // URL to web API
final Client _http;
}
\ No newline at end of file
Supports Markdown
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