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
import { Injectable } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
import { Router } from '@angular/router'; | |
import {config} from '../../config/cosmo.config' | |
import {blogModel} from '../models/cosmic.model'; | |
import {registerModel} from '../models/cosmic.model';@Injectable()export class CosmicService { | |
data; | |
message; | |
URL = config.URL; | |
bucket_slug = config.bucket_slug; |
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
export class registerModel { | |
_id: string; | |
username: string; | |
email: string; | |
password: string; | |
fullName: string; | |
imageUrl: string; | |
} | |
export class blogModel { |
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
export const config = { | |
production: false, | |
read_key: 'YOUR COSMIC READ KEY', | |
write_key: 'YOUR COSMIC WRITE KEY', | |
bucket_id: 'YOUR COSMIC BUCKET ID', | |
bucket_slug: 'YOUR COSMIC BUCKET SLUG', | |
URL: 'https://api.cosmicjs.com/v1/', | |
}; |
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
import { Component, OnInit } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
import { Router } from '@angular/router'; | |
import { CosmicService } from '../../services/cosmic.service'@Component({ | |
selector: 'app-allblogs', | |
templateUrl: './allblogs.component.html', | |
styleUrls: ['./allblogs.component.css'] | |
}) | |
export class AllblogsComponent implements OnInit { | |
data; |
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
import { Component, OnInit, Output, EventEmitter } from '@angular/core'; | |
import { Router } from '@angular/router'; | |
import { Http } from '@angular/http'; | |
import { FormBuilder, FormGroup, FormControl, Validators } from '@angular/forms'; | |
import { CosmicService } from '../../services/cosmic.service'; | |
import {config} from '../../../config/cosmo.config' | |
import {blogModel} from '../../models/cosmic.model'@Component({ | |
selector: 'app-dashboard', | |
templateUrl: './dashboard.component.html', | |
styleUrls: ['./dashboard.component.css'] |
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
import { Component, OnInit } from '@angular/core'; | |
import { ActivatedRoute, Router } from '@angular/router'; | |
import { Http } from '@angular/http'; | |
import { CosmicService } from '../../services/cosmic.service'@Component({ | |
selector: 'app-usersinglepost', | |
templateUrl: './usersinglepost.component.html', | |
styleUrls: ['./usersinglepost.component.css'] | |
}) | |
export class UsersinglepostComponent implements OnInit { | |
data; |
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
import { Component, OnInit } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
import { Router } from '@angular/router'; | |
import { CosmicService } from '../../services/cosmic.service' | |
import {config} from '../../../config/cosmo.config'import { FormBuilder, FormGroup, FormControl, Validators } from '@angular/forms'; | |
@Component({ | |
selector: 'app-register', | |
templateUrl: './register.component.html', | |
styleUrls: ['./register.component.css'] |
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
import { Component, OnInit } from '@angular/core'; | |
import { Http, Headers, RequestOptions } from '@angular/http'; | |
import { Router } from '@angular/router'; | |
import { FormBuilder, FormGroup, FormControl, Validators } from '@angular/forms'; | |
import { CosmicService } from '../../services/cosmic.service' | |
import {config} from '../../../config/cosmo.config'@Component({ | |
selector: 'app-login', | |
templateUrl: './login.component.html', | |
styleUrls: ['./login.component.css'] | |
}) |
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
... | |
"dependencies": { | |
"@angular/cli": "^1.1.3", | |
"@angular/compiler-cli": "^4.0.0", | |
... | |
}, | |
... |
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
{ | |
... | |
"scripts": { | |
... | |
"start": "node app.js" | |
}, | |
... | |
"engines": { | |
"node": "6.9.4", | |
"npm": "4.2.0" |
OlderNewer