Skip to content

Instantly share code, notes, and snippets.


Pete Bacon Darwin petebacondarwin

View GitHub Profile
View angular-di.ts
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'));
View ng-route-web-components-crash.html
<!DOCTYPE html>
<template id='my-component-template'>
@import url('whatever...');

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?

View app.js
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 / app.js
Created Oct 11, 2012 — forked from ggoodman/app.js
AngularJS@1.0.2 + Jasmine
View app.js
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$ = 'World';