Commit cef7666e by Antti Väyrynen

3 new component templates

1 parent 6e6e486c
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"test": "test.ts", "test": "test.ts",
"tsconfig": "tsconfig.app.json", "tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json", "testTsconfig": "tsconfig.spec.json",
"prefix": "app", "prefix": "moya",
"styles": [ "styles": [
"styles.scss" "styles.scss"
], ],
......
...@@ -5,16 +5,4 @@ ...@@ -5,16 +5,4 @@
</h1> </h1>
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="> <img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
</div> </div>
<h2>Here are some links to help you start: </h2> <moya-organization-list></moya-organization-list>
<ul> \ No newline at end of file
<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>
...@@ -5,6 +5,7 @@ import { NgModule } from '@angular/core'; ...@@ -5,6 +5,7 @@ import { NgModule } from '@angular/core';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { AppMockService } from './shared/app.mock.service'; import { AppMockService } from './shared/app.mock.service';
import { AppService } from './shared/app.service'; import { AppService } from './shared/app.service';
import { OrganizationModule } from './organization/organization.module';
@NgModule({ @NgModule({
...@@ -12,7 +13,8 @@ import { AppService } from './shared/app.service'; ...@@ -12,7 +13,8 @@ import { AppService } from './shared/app.service';
AppComponent AppComponent
], ],
imports: [ imports: [
BrowserModule BrowserModule,
OrganizationModule
], ],
providers: [{ provide: AppService, useClass: AppMockService}], providers: [{ provide: AppService, useClass: AppMockService}],
bootstrap: [AppComponent] bootstrap: [AppComponent]
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EventListComponent } from './event-list.component';
describe('EventListComponent', () => {
let component: EventListComponent;
let fixture: ComponentFixture<EventListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EventListComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EventListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'moya-event-list',
templateUrl: './event-list.component.html',
styleUrls: ['./event-list.component.scss']
})
export class EventListComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NewOrganizationComponent } from './new-organization.component';
describe('NewOrganizationComponent', () => {
let component: NewOrganizationComponent;
let fixture: ComponentFixture<NewOrganizationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NewOrganizationComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NewOrganizationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'moya-new-organization',
templateUrl: './new-organization.component.html',
styleUrls: ['./new-organization.component.scss']
})
export class NewOrganizationComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { OrganizationListComponent } from './organization-list.component';
describe('OrganizationListComponent', () => {
let component: OrganizationListComponent;
let fixture: ComponentFixture<OrganizationListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ OrganizationListComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OrganizationListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'moya-organization-list',
templateUrl: './organization-list.component.html',
styleUrls: ['./organization-list.component.scss']
})
export class OrganizationListComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NewOrganizationComponent } from './new-organization/new-organization.component';
import { OrganizationListComponent } from './organization-list/organization-list.component';
import { EventListComponent } from './event-list/event-list.component';
@NgModule({
imports: [
CommonModule
],
declarations: [NewOrganizationComponent, OrganizationListComponent, EventListComponent],
exports: [NewOrganizationComponent, OrganizationListComponent, EventListComponent],
})
export class OrganizationModule { }
...@@ -120,12 +120,13 @@ ...@@ -120,12 +120,13 @@
"directive-selector": [ "directive-selector": [
true, true,
"attribute", "attribute",
"app", "moya",
"camelCase" "camelCase"
], ],
"component-selector": [ "component-selector": [
true, true,
"element", "element",
"moya",
"app", "app",
"kebab-case" "kebab-case"
], ],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!