Skip to content

Instantly share code, notes, and snippets.

View petebacondarwin's full-sized avatar

Pete Bacon Darwin petebacondarwin

View GitHub Profile
import {Modal} from './interfaces'
export interface MyModal extends Modal {
new(message: string): this
}
///////////
// obviously this is contrived because you are unlikely to want a singleton modal instance
angular.module('foo').value('myModalInstance', new MyModal('some message'));
<!DOCTYPE html>
<html>
<body>
<template id='my-component-template'>
<style>
@import url('whatever...');
</style>
</template>

What is dgeni?

dgeni is a documentation generator developed by the Angular team. Ironically it lacks documentation right now, so we try to develop a very simple step-by-step-guide here, until a better documentation is available. Please share and fork this Gist.

dgeni is currently used in these project

Why should I use dgeni?

angular.module('onlineModule',[]).factory('dataService', { ... });
angular.module('offlineModule',[]).factory('dataService', { ... });
var app = angular.module('myApp', ['onlineModule']); // onlineModule or offlineModule
app.service('x', function (dataService) { // $dataService could be onlineModule.dataService or offlineModule.dataService
// online or offline? we don't care!
});
app.service('y', function (dataService) {
@petebacondarwin
petebacondarwin / app.js
Created October 11, 2012 14:01 — forked from ggoodman/app.js
AngularJS@1.0.2 + Jasmine
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.name = 'World';
});