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
i have object that consists of properties each of them is object on it's own | |
i want to check if certian property exisit or not if it exisit return it's value | |
``` | |
controlsValidation: Object = { | |
nameAr: { | |
required: true | |
}, | |
nameEn: { |
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=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="css/ionicons.min.css" media="all"> | |
<link rel="stylesheet" href="css/bootstrap.min.css"> | |
<link rel="stylesheet" href="css/material.indigo-pink.min.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
export enum ComponentType { | |
Program = 1, | |
Report = 2, | |
Setup = 3, | |
Dashboard = 4, | |
Favourits = 5 | |
} |
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
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header mdl-color--grey-100"> | |
<header class="mdl-layout__header" *ngIf="userLogged"> | |
<!-- content here should only visiable to members only --> | |
</header> | |
<div class="mdl-layout__drawer"> | |
</div> | |
<main class="mdl-layout__content"> | |
<section class="mdl-layout__tab-panel is-active" *ngIf="userLogged"> |
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 {Directive, Attribute, DynamicComponentLoader, ElementRef} from 'angular2/core'; | |
import {Router, RouterOutlet, ComponentInstruction} from 'angular2/router'; | |
import { AuthService } from '../security/auth/auth'; | |
@Directive({ | |
selector: 'router-outlet' | |
}) | |
export class LoggedInRouterOutlet extends RouterOutlet { | |
publicRoutes: Array<string>; | |
private parentRouter: Router; |
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
{ | |
"pageData": [ | |
{ | |
"name": 1, | |
"keyWord": [ | |
{ | |
"key": "title", | |
"value": "sanabel", | |
"id": 1 | |
}, |
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
const int SECOND = 1; | |
const int MINUTE = 60 * SECOND; | |
const int HOUR = 60 * MINUTE; | |
const int DAY = 24 * HOUR; | |
const int MONTH = 30 * DAY; | |
var ts = new TimeSpan(DateTime.UtcNow.Ticks - yourDate.Ticks); | |
double delta = Math.Abs(ts.TotalSeconds); | |
if (delta < 1 * MINUTE) |
NewerOlder