Skip to content

Commit

Permalink
added new class,service and component
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickNgare committed Jan 12, 2018
1 parent ba69d0e commit f4f7bf9
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 28 deletions.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14"
Expand Down
21 changes: 1 addition & 20 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,20 +1 @@
<!--The content below is only a placeholder and can be replaced.-->
<div style="text-align:center">
<h1>
Welcome to {{ title }}!
</h1>
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
</div>
<h2>Here are some links to help you start: </h2>
<ul>
<li>
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
</li>
</ul>

<app-landing-page></app-landing-page>
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app';

}
4 changes: 3 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpModule } from '@angular/http';


import { AppComponent } from './app.component';
Expand All @@ -12,7 +13,8 @@ import { LandingPageComponent } from './landing-page/landing-page.component';
LandingPageComponent
],
imports: [
BrowserModule
BrowserModule,
HttpModule
],
providers: [],
bootstrap: [AppComponent]
Expand Down
3 changes: 3 additions & 0 deletions src/app/landing-page/landing-page.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
header h2{
color: black;
}
6 changes: 3 additions & 3 deletions src/app/landing-page/landing-page.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<p>
landing-page works!
</p>
<header><h2>Welcome to github look up</h2></header>
Github:<input name="title" searchTerm />
<button class="btn btn-dark btn-large" (click)='performSearch(searchTerm)'>Search User</button>
7 changes: 5 additions & 2 deletions src/app/landing-page/landing-page.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { Http,Response } from '@angular/http';
import {CommonModule} from '@angular/common';
import 'rxjs/add/operator/map';

@Component({
selector: 'app-landing-page',
Expand All @@ -7,9 +10,9 @@ import { Component, OnInit } from '@angular/core';
})
export class LandingPageComponent implements OnInit {

constructor() { }

ngOnInit() {
}



}
15 changes: 15 additions & 0 deletions src/app/search/searchservice.service.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { TestBed, inject } from '@angular/core/testing';

import { SearchserviceService } from './searchservice.service';

describe('SearchserviceService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [SearchserviceService]
});
});

it('should be created', inject([SearchserviceService], (service: SearchserviceService) => {
expect(service).toBeTruthy();
}));
});
8 changes: 8 additions & 0 deletions src/app/search/searchservice.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Injectable } from '@angular/core';

@Injectable()
export class SearchserviceService {

constructor() { }

}
2 changes: 2 additions & 0 deletions src/app/user.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export class User {
}
2 changes: 1 addition & 1 deletion src/styles.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/* You can add global styles to this file, and also import other style files */
@import '~bootstrap/dist/css/bootstrap.min.css';

0 comments on commit f4f7bf9

Please sign in to comment.