mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
routing to login page
This commit is contained in:
3
src/app/accounts/login.component.html
Normal file
3
src/app/accounts/login.component.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<form>
|
||||
Login form.
|
||||
</form>
|
||||
16
src/app/accounts/login.component.ts
Normal file
16
src/app/accounts/login.component.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import * as template from './login.component.html';
|
||||
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
template: template,
|
||||
})
|
||||
export class LoginComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
// TODO?
|
||||
}
|
||||
}
|
||||
18
src/app/app-routing.module.ts
Normal file
18
src/app/app-routing.module.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import {
|
||||
RouterModule,
|
||||
Routes,
|
||||
} from '@angular/router';
|
||||
|
||||
import { LoginComponent } from './accounts/login.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: '/login', pathMatch: 'full' },
|
||||
{ path: 'login', component: LoginComponent },
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes/*, { enableTracing: true }*/)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
@@ -1,15 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'my-app',
|
||||
styles: [''],
|
||||
template: `
|
||||
<div class="jumbotron text-center">
|
||||
<h1>The App Lives!</h1>
|
||||
<p>{{ message }}</p>
|
||||
</div>
|
||||
`,
|
||||
selector: 'app-root',
|
||||
styles: [],
|
||||
template: 'App<br /><router-outlet></router-outlet>',
|
||||
})
|
||||
export class AppComponent {
|
||||
message = 'This is the sample message.';
|
||||
}
|
||||
|
||||
1
src/app/app.d.ts
vendored
Normal file
1
src/app/app.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module '*.html';
|
||||
@@ -1,12 +1,22 @@
|
||||
import 'zone.js/dist/zone';
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { LoginComponent } from './accounts/login.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [BrowserModule],
|
||||
declarations: [AppComponent],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
AppRoutingModule,
|
||||
],
|
||||
declarations: [
|
||||
AppComponent,
|
||||
LoginComponent,
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule { }
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>bitwarden</title>
|
||||
<base href="/">
|
||||
</head>
|
||||
<body class="container">
|
||||
<my-app></my-app>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
Reference in New Issue
Block a user