Skip to content

Instantly share code, notes, and snippets.

@jelbourn
jelbourn / angular-polymorphism.js
Last active April 9, 2016 17:55 — forked from anonymous/jsbin.EhAnIMaJ.html
Simple angular directive for polymorphism. Running example: http://jsbin.com/EhAnIMaJ/2/edit
var module = angular.module('test', []);
// Simple directive lets you use polymorphism.
module.directive('filter', function() {
return {
scope: {filter: '=filter'},
template: '<div ng-include="filter.url"></div>'
};
});