Skip to content

Commit

Permalink
New page terms and cond code4romania#58
Browse files Browse the repository at this point in the history
  • Loading branch information
danichim committed Jan 26, 2019
1 parent b97356f commit 4ea48ab
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { AddAppModule } from './pages/AddAppPage/addApp.module';
import { ApproveAppModule } from './pages/ApproveApp/approveApp.module';
import { LoginModule } from './pages/LoginPage/login.module';
import { SearchModule } from './pages/SearchPage/search.module';
import { TermsModule } from "./pages/TermsPage/terms.module";

import { AuthService } from './services/auth.service';
import { enableProdMode } from '@angular/core';
Expand All @@ -33,6 +34,7 @@ enableProdMode();
ApproveAppModule,
LoginModule,
SearchModule,
TermsModule,
ReCaptchaModule
],
providers: [AuthService],
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/header/header.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a [routerLink]="['/home']" routerLinkActive="active" class="navbar-brand brand-small hidden-xs hidden-md hidden-lg">
<a [routerLink]="['/terms']" routerLinkActive="active" class="navbar-brand brand-small hidden-xs hidden-md hidden-lg">
<i class="fa fa-usb" aria-hidden="true"></i>
</a>
<a [routerLink]="['/home']" routerLinkActive="active" class="navbar-brand logo-type visible-xs visible-md visible-lg">
<a [routerLink]="['/terms']" routerLinkActive="active" class="navbar-brand logo-type visible-xs visible-md visible-lg">
Centru Ci<i class="fa fa-usb" aria-hidden="true"></i>ic
</a>
</div>
Expand Down
10 changes: 10 additions & 0 deletions src/app/pages/TermsPage/components/terms/terms.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="terms">
<div class="page-title">
<h1>
Terms and conditions
</h1>
</div>
<div class="row">
Demo content
</div>
</div>
Empty file.
30 changes: 30 additions & 0 deletions src/app/pages/TermsPage/components/terms/terms.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { ActivatedRoute, Params } from '@angular/router';
import { AppService } from './../../../../services/app.service';
import { App } from './../../../../shared/models/app.model';

import './terms.component.scss';

@Component({
selector: 'terms',
templateUrl: './terms.component.html'
})

export class TermsComponent implements OnInit {
apps: App;
constructor(private route: ActivatedRoute, private appService: AppService, private router: Router) {
}

ngOnInit() {
this.route.params.subscribe((data) => {
})
}
goToApp(app) {
let appName = app.appName = app.appName.replace(/\s+/g, '');
let link = ['/apps', app.id, appName];
this.router.navigate(link);

}

}
10 changes: 10 additions & 0 deletions src/app/pages/TermsPage/config/terms.routing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Routes, RouterModule } from '@angular/router';

import { TermsComponent } from '../components/terms/terms.component';

const appRoutes: Routes = [
{
path: 'terms', component: TermsComponent
}
];
export const TermsRouting = RouterModule.forChild(appRoutes);
13 changes: 13 additions & 0 deletions src/app/pages/TermsPage/terms.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';

import { TermsComponent } from './components/terms/terms.component';
import { TermsRouting } from './config/terms.routing';

@NgModule({
imports: [BrowserModule, HttpModule, TermsRouting],
declarations: [TermsComponent],
exports: [TermsComponent]
})
export class TermsModule {}

0 comments on commit 4ea48ab

Please sign in to comment.