Skip to content

Instantly share code, notes, and snippets.

@joeeames
joeeames / karma-e2e.conf.js
Last active December 17, 2015 05:28
karma end to end test runner configuration
basePath = '';
files = [
ANGULAR_SCENARIO,
ANGULAR_SCENARIO_ADAPTER,
'scenarios.js'
];
autoWatch = false;
button {
color: #ED652E;
background-color: #999;
}
'use strict';
var webpack = require('webpack'),
path = require('path');
// PATHS
var PATHS = {
app: __dirname + '/app',
bower: __dirname + '/app/bower_components'
};
module.exports = {
context: PATHS.app,
'use strict';
var Promise = require("bluebird")
, chai = require("chai")
, chaiAsPromised = require('chai-as-promised')
, should = chai.should()
;
chai.use(chaiAsPromised);
<div>
<div [hidden]='!collapsed()' (click)="collapseAddress()">
<h4>1 Address:</h4>
{{user.address.street}} <br />
{{user.address.city}}<br />
{{user.address.planet}}
</div>
<div [hidden]='collapsed()' (click)="expandAddress()">
<h4>2 Address:</h4>
{{user.address.planet}}...
import {Injectable} from 'angular2/angular2';
//@Injectable()
export class TodoItemsService {
items: array = [];
}
import {Injectable} from 'angular2/angular2';
@Injectable()
export class TodoItemsService {
items: array = [];
}
@joeeames
joeeames / myservice.js
Created August 10, 2015 03:22
simple service for ng2
var fb = new Firebase('https://ng2-thatconf.firebaseio.com/todoItems/');
var todoItems = [];
fb.on("child_added", function(snapshot) {
todoItems.push(snapshot.val());
})
export {todoItems};
<!doctype html>
<html>
<head>
<title>Angular 2 Demo</title>
<script src="https://cdn.firebase.com/js/client/2.2.9/firebase.js"></script>
<script src="libs/system.js"></script>
<script src="config.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
@joeeames
joeeames / index.js
Last active September 29, 2015 19:56
module.exports = function() {
console.log('Hello Mars!')
}