-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
173 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,7 @@ node_modules | |
.idea | ||
bower_components | ||
*.js | ||
|
||
.DS_Store | ||
|
||
typings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
///<reference path="../node_modules/angular2/typings/browser.d.ts"/> | ||
|
||
import { bootstrap } from 'angular2/platform/browser'; | ||
import { AppComponent } from "./components/app/app.component"; | ||
|
||
bootstrap(AppComponent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header"> | ||
<header class="mdl-layout__header"> | ||
<div class="mdl-layout__header-row"> | ||
<a class="md-title-icon" href="#" target="_blank"><i></i></a> | ||
<span class="mdl-layout-title">Contacts Manager</span> | ||
</div> | ||
<div class="mdl-navigation"> | ||
<!--<a *ngFor="#item of menuItems" [routerLink]="item.link" class="nav-link" href="">{{item.name}}</a>--> | ||
</div> | ||
</header> | ||
<main class="mdl-layout__content"> | ||
<section> | ||
<div class="page-content"> | ||
<router-outlet></router-outlet> | ||
</div> | ||
</section> | ||
</main> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Component } from 'angular2/core'; | ||
import { RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from 'angular2/router'; | ||
import { CreateContactComponent } from "../create-contact/create-contact.component"; | ||
import { DisplayContactsComponent } from "../display-contacts/display-contacts"; | ||
|
||
@Component({ | ||
selector: 'contacts-app', | ||
templateUrl: './src/components/app/app.component.html', | ||
directives: [ROUTER_DIRECTIVES], | ||
providers: [ROUTER_PROVIDERS] | ||
}) | ||
@RouteConfig([ | ||
{ | ||
path: '/contacts', | ||
name: 'Contacts', | ||
component: DisplayContactsComponent, | ||
useAsDefault: true | ||
}, | ||
{ | ||
path: '/create-contact', | ||
name: 'CreateContact', | ||
component: CreateContactComponent | ||
} | ||
]) | ||
export class AppComponent { | ||
public menuItems = [ | ||
{name: 'Contacts', link: ['Contacts']} | ||
]; | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
88 changes: 45 additions & 43 deletions
88
ContactsManager/src/components/create-contact/create-contact.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,45 @@ | ||
<h4>Create Contact</h4> | ||
<form [ngFormModel]="contactForm" (submit)="doLogin($event)"> | ||
|
||
<div class="form-group"> | ||
<label for="email">Name</label> | ||
<input class="form-control" id="name" ngControl="name"> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="address">Address</label> | ||
<input class="form-control" id="address" ngControl="address"> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="city">City</label> | ||
<input class="form-control" id="city" ngControl="city"> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="state">State</label> | ||
<input class="form-control" id="state" ngControl="state"> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="zip">Zip</label> | ||
<input class="form-control" id="zip" ngControl="zip"> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="email">Email</label> | ||
<input class="form-control" id="email" ngControl="email"> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="twitter">Twitter</label> | ||
<input class="form-control" id="twitter" ngControl="twitter"> | ||
</div> | ||
|
||
<button type="submit" class="btn btn-default">Log in</button> | ||
|
||
|
||
|
||
</form> | ||
<article class="template animated slideInRight"> | ||
<h4>Create Contact</h4> | ||
<form [ngFormModel]="contactForm" (submit)="doLogin($event)"> | ||
|
||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> | ||
<label class="mdl-textfield__label" for="email">Name</label> | ||
<input class="mdl-textfield__input" type="text" id="name" ngControl="name"> | ||
</div> | ||
|
||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> | ||
<label class="mdl-textfield__label" for="address">Address</label> | ||
<input class="mdl-textfield__input" type="text" id="address" ngControl="address"> | ||
</div> | ||
|
||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> | ||
<label class="mdl-textfield__label" for="city">City</label> | ||
<input class="mdl-textfield__input" type="text" id="city" ngControl="city"> | ||
</div> | ||
|
||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> | ||
<label class="mdl-textfield__label" for="state">State</label> | ||
<input class="mdl-textfield__input" type="text" id="state" ngControl="state"> | ||
</div> | ||
|
||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> | ||
<label class="mdl-textfield__label" for="zip">Zip</label> | ||
<input class="mdl-textfield__input" type="text" id="zip" ngControl="zip"> | ||
</div> | ||
|
||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> | ||
<label class="mdl-textfield__label" for="email">Email</label> | ||
<input class="mdl-textfield__input" type="text" id="email" ngControl="email"> | ||
</div> | ||
|
||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> | ||
<label class="mdl-textfield__label" for="twitter">Twitter</label> | ||
<input class="mdl-textfield__input" type="text" id="twitter" ngControl="twitter"> | ||
</div> | ||
|
||
<button type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent"> | ||
Log in | ||
</button> | ||
|
||
</form> | ||
</article> |
34 changes: 19 additions & 15 deletions
34
ContactsManager/src/components/display-contacts/display-contacts.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" *ngFor="#contact of contactsList"> | ||
<div class="panel panel-primary"> | ||
<div class="panel-heading">{{contact.name}}</div> | ||
<div class="panel-body"> | ||
<p>{{contact.address}}</p> | ||
<p> | ||
<span>{{contact.city}}</span>, | ||
<span>{{contact.state}}</span> | ||
<span>{{contact.zip}}</span> | ||
</p> | ||
<p>{{email}}</p> | ||
<p> | ||
<a [href]="'http:https://twitter.com/' + contact.twitter">@{{contact.twitter}}</a> | ||
</p> | ||
<div class="mdl-grid"> | ||
<div class="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--4-col mdl-cell--3-col-tablet mdl-cell--3-col-desktop" | ||
*ngFor="#contact of contactsList"> | ||
<div class="mdl-card__title mdl-card--expand"> | ||
<h2 class="mdl-card__title-text">{{contact.name}}</h2> | ||
</div> | ||
<div class="mdl-card__supporting-text mdl-color-text--grey-600"> | ||
{{contact.address}}, {{contact.city}}, {{contact.state}} {{contact.zip}} | ||
</div> | ||
<div class="mdl-card__supporting-text mdl-color-text--grey-600"> | ||
{{contact.email}} | ||
</div> | ||
<div class="mdl-card__actions mdl-card--border"> | ||
<a [href]="'http:https://twitter.com/' + contact.twitter" class="mdl-button mdl-js-button mdl-js-ripple-effect">@{{contact.twitter}}</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!--<button class="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">--> | ||
<!--<i class="material-icons">add</i>--> | ||
<!--</button>--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ | |
"noImplicitAny": false | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
"node_modules", | ||
"typings/main", | ||
"typings/main.d.ts" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"ambientDependencies": { | ||
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#4de74cb527395c13ba20b438c3a7a419ad931f1c", | ||
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#bc92442c075929849ec41d28ab618892ba493504" | ||
} | ||
} |