This file contains hidden or 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="fancy_checkbox"> | |
<div class="box {{checked}}"></div> | |
</div> |
This file contains hidden or 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 class="file {{data.extension}}" on-click="emitClick()"> | |
<span class="folder-name">{{data.basename}}</span> | |
</i> |
This file contains hidden or 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
it('should call append', inject($, MyUI, function(jQuery, ui) { | |
spyOn(jQuery, 'append'); | |
ui.render(); | |
expect(jQuery.append).toHaveBeenCalled(); | |
}); |
This file contains hidden or 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
// helper function, we can even ship these | |
define(['di/annotations'], function(annotations) { | |
var Inject = annotations.Inject; | |
var annotate = annotations.annotate; | |
return function inject(fn) { | |
var deps = Array.prototype.slice.call(arguments, 1); | |
var annotation = new Inject(); | |
Inject.apply(annotation, deps); | |
This file contains hidden or 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
function Config() { | |
this.useFoo = false; | |
this.log = 'infoo; | |
} | |
@Inject(Config) | |
class SomeService{ | |
constructor(config) { | |
// ... |
This file contains hidden or 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 {module as nodeBindings} from './node_bindings'; | |
import {Injector} from 'di'; | |
import {Foo} from './foo'; | |
var injector = new Injector(nodeBindings); | |
var foo = injector.get(Foo); |
This file contains hidden or 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
// Transpiled by | |
// ./node_modules/traceur/traceur --modules=instantiate | |
System.register("foo", [], function($__export) { | |
"use strict"; | |
var __moduleName = "foo"; | |
return { | |
setters: [], | |
execute: function() { | |
console.log('executing...'); | |
} |
This file contains hidden or 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
class Car { | |
start() {} | |
} | |
class Mustang extends Car { | |
startGasEngine() { | |
print('Starting gas engine.'); | |
} | |
openWindow() {} |
This file contains hidden or 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
// Annotations can be put on: | |
// - functions / classes | |
// - function parameters | |
@Foo('bar') | |
function foo(@Baz() param1, @Baz() param2: Foo) {} | |
// GETS TRANSPILED INTO: | |
function foo() {} | |
// Using property getters, so that it works with circular references. |
This file contains hidden or 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 PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html xmlns:ng="http://angularjs.org"> | |
<head> | |
<script type="text/javascript" src="../angular.js/src/angular-bootstrap.js" ng:autobind></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
angular.markup('---', function(text, textNode, parentElement) { | |
var compiler = this; |
OlderNewer