Skip to content

Commit

Permalink
added services
Browse files Browse the repository at this point in the history
  • Loading branch information
hardikAgarwal2314 committed Jan 24, 2019
1 parent f0bff81 commit 66d186e
Show file tree
Hide file tree
Showing 23 changed files with 4,651 additions and 28 deletions.
27 changes: 20 additions & 7 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { AvtaarComponent } from './avtaar/avtaar.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {AppComponent} from './app.component';
import {AvtaarComponent} from './avtaar/avtaar.component';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MainServices} from './services/main.services';
import {TopsServices} from './services/tops.services';
import {FaceServices} from './services/face.services';
import {ColorsServices} from './services/colors.services';
import {AccessoriesServices} from './services/accessories.services';
import {ClothesServices} from './services/clothes.services';

@NgModule({
declarations: [
Expand All @@ -13,7 +19,14 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
BrowserModule,
BrowserAnimationsModule
],
providers: [],
providers: [
MainServices,
TopsServices,
FaceServices,
ColorsServices,
AccessoriesServices,
ClothesServices
],
bootstrap: [AppComponent]
})
export class AppModule { }
export class AppModule {}
10 changes: 8 additions & 2 deletions src/app/avtaar/avtaar.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Component, OnInit } from '@angular/core';
import {Component, OnInit} from '@angular/core';
import {MainServices, Options} from '../services/main.services';
import {DomSanitizer} from '@angular/platform-browser';

@Component({
selector: 'app-avtaar',
Expand All @@ -7,9 +9,13 @@ import { Component, OnInit } from '@angular/core';
})
export class AvtaarComponent implements OnInit {

constructor() { }
constructor(public mainService: MainServices, private sanitizer: DomSanitizer) { }

ngOnInit() {
}

getSvg() {
return this.sanitizer.bypassSecurityTrustHtml(this.mainService.getSvg(new Options()));
}

}
2 changes: 1 addition & 1 deletion src/app/enums/accessories.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum Accessories {
export enum Accessories {
BLANK,
KURTA,
PRESCRIPITON01,
Expand Down
2 changes: 1 addition & 1 deletion src/app/enums/avatar-style.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum AvatarStyle {
export enum AvatarStyle {
CIRCLE,
TRANSPARENT,
}
3 changes: 1 addition & 2 deletions src/app/enums/cloth-color.enum.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

enum ClothColor {
export enum ClothColor {
BLACK,
BLUE1,
BLUE2,
Expand Down
2 changes: 1 addition & 1 deletion src/app/enums/clothe.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum Cloth {
export enum Cloth {
BLAZER_SHIRT,
BLAZER_SWEATER,
COLLAR_SWEATER,
Expand Down
2 changes: 1 addition & 1 deletion src/app/enums/eyebrow.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum Eyebrow {
export enum Eyebrow {
ANGRY,
ANGRY_NATURAL,
NONE,
Expand Down
4 changes: 2 additions & 2 deletions src/app/enums/eyes.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum Eyes {
export enum Eyes {
CLOSE,
CRY,
NONE,
Expand All @@ -10,5 +10,5 @@ enum Eyes {
SQUINT,
SURPRISED,
WINK,
winkwacky
WINKWACKY
}
2 changes: 1 addition & 1 deletion src/app/enums/facial-hair-color.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum FacialHairColor {
export enum FacialHairColor {
AUBURN,
BLACK,
BLONDE,
Expand Down
2 changes: 1 addition & 1 deletion src/app/enums/facial-hair.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum FacialHair {
export enum FacialHair {
BLANK,
BEARD_MEDIUM,
BEARD_LIGHT,
Expand Down
4 changes: 2 additions & 2 deletions src/app/enums/graphic.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum Graphic {
export enum Graphic {
BAT,
CUMBIA,
DEER,
Expand All @@ -8,6 +8,6 @@ enum Graphic {
RESIST,
SELENA,
BEAR,
skulloutline,
SKULLOUTLINE,
SKULL
}
2 changes: 1 addition & 1 deletion src/app/enums/hair-color.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum HairColor {
export enum HairColor {
AURBURN,
BLACK,
BLONDE,
Expand Down
2 changes: 1 addition & 1 deletion src/app/enums/hat-color.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum HatColor {
export enum HatColor {
BLACK,
BLUE01,
BLUE02,
Expand Down
2 changes: 1 addition & 1 deletion src/app/enums/mouth.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum Mouth {
export enum Mouth {
CONCERNED,
NONE,
DISBELIEF,
Expand Down
2 changes: 1 addition & 1 deletion src/app/enums/skin.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum Skin {
export enum Skin {
TANNED,
YELLOW,
PALE,
Expand Down
2 changes: 1 addition & 1 deletion src/app/enums/tops.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum Top {
export enum Top {
NO_HAIR,
EYEPATCH,
HAT,
Expand Down
Loading

0 comments on commit 66d186e

Please sign in to comment.