Skip to content

Instantly share code, notes, and snippets.

View Hitman666's full-sized avatar

Nikola Brežnjak Hitman666

View GitHub Profile
@Hitman666
Hitman666 / gist:53cf15f36cb8c550e4cb946a57c3138c
Last active July 14, 2016 19:29
Ionic's index.html file of the tabs template
```
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<h2>Welcome to GiphySearch</h2>
<ion-tab title="Home" icon-off="ion-ios-home-outline" icon-on="ion-ios-home" href="#/tab/dash">
<!-- Search Tab -->
<ion-tab title="Search" icon-off="ion-ios-search" icon-on="ion-ios-search-strong" href="#/tab/search">
<ion-nav-view name="tab-search"></ion-nav-view>
</ion-tab>
{{^config.googleoauth}}
<form class="form-inline pull-right">{{#config.authentication}}
{{#loggedIn}}
<div class="dropdown"><button id="userDropDown" class="btn btn-info dropdown-toggle" type="button" data-toggle="dropdown">
{{username}}
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a class="btn btn-info" href="{{config.base_url}}/logout">{{lang.login.logout}}</a></li>
<div class="form-bottom">{{#config.googleoauth}}
<a class="zocial google" href="/auth/login">Sign in with Google</a>
{{/config.googleoauth}}{{^config.googleoauth}}
<form class="login-form" action="" method="post">
<div class="form-group"><label class="sr-only" for="form-username">{{lang.login.username}}</label>
<input id="form-username" class="form-username form-control" tabindex="1" name="username" type="text" placeholder="{{lang.login.username}}" /></div>
<div class="form-group"><label class="sr-only" for="form-password">{{lang.login.password}}</label>
<input id="form-password" class="form-password form-control" tabindex="2" name="password" type="password" placeholder="{{lang.login.password}}" /></div>
<button class="btn" type="submit">{{lang.login.login}}</button>
@Hitman666
Hitman666 / tsHello.ts
Last active September 14, 2016 10:16
const msg: string = "Hello, hello!";
function myFunc (msg: string): string {
return 'I like to repeat what you said, therefore: ' + msg;
}
console.log(myFunc(msg));
performSearch(searchTerm: string): string {
console.log(`User unio: ${searchTerm}`);
return searchTerm;
}
it('should have a function performSearch',
inject([AppComponent], (app: AppComponent) => {
expect(app.performSearch).toBeTruthy();
}));
import { Component } from '@angular/core';
import { Http, Response } from '@angular/http';
@Component({
moduleId: module.id,
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['app.component.css']
})