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 { HttpClient, HttpHeaders, HttpParams } from "@angular/common/http"; | |
import { Injectable } from "@angular/core"; | |
import { TokenManager } from "@app/shared/services/token-manager.service"; | |
@Injectable() | |
export class ApiHandler { | |
constructor(private http: HttpClient) {} | |
apiGet(url, params?, extras?: Extras) { | |
let options = this.renderHeaders(extras); |
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
onmessage = function(e) { | |
console.log('Message received from main script'); | |
var workerResult = 'Result: ' + (e.data[0] * e.data[1]); | |
console.log('Posting message back to main script'); | |
postMessage(workerResult); | |
} |
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"; | |
@Component({ | |
selector: "app-dashboard", | |
templateUrl: "dashboard.component.html" | |
}) | |
export class DashboardComponent implements OnInit { | |
constructor() {} | |
ngOnInit() { |
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
server { | |
listen 80; | |
server_name www.js-server.com js-server.com; | |
root /home/jyotendra/files/projects/express-sequelize/; | |
location ~ | |
^/(assets/|public/|images/|img/|javascript/|js/|css/|stylesheets/|media/|static){ |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>NgApp</title> | |
<!-- Need to change this base href to proper folder hierarchy --> | |
<base href="/ng/"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<link rel="icon" type="image/x-icon" href="favicon.ico"> |
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 * as fs from 'fs' | |
import * as path from 'path' | |
import * as Sequelize from 'sequelize' | |
// configuration to connect to db are getted | |
const config = require('../config/config.json') | |
// Import model specification from its own definition file. | |
import { LanguageInstance, LanguageAttributes } from './language' | |
import { AppUserInstance, AppUserAttributes } from './appuser' |
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 * as Sequelize from 'sequelize' | |
export interface AppUserAttributes { | |
id?: string | |
active?: boolean, | |
avatar?: string, | |
email?: string, | |
firstName?: string, |
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
namespace Data.Model | |
{ | |
class Image | |
{ | |
public string Title { get; set; } | |
public bool IsBlurred { get; set; } = false; | |
} | |
} |
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 is my test implementation | |
*/ | |
import React from 'react' | |
import { Switch, Route } from 'react-router-dom' | |
import Home from './Home' | |
import Roster from './Roster' | |
import Schedule from './Schedule' |
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 {combineReducer} from "redux"; | |
import counter from "./reducerExample"; | |
/* | |
The idea is to | |
*/ | |
export default const rootReducer = combineReducer({ | |
counter | |
//, other reducers goes here with this object. | |
}); |