Open
Description
I'm having trouble getting a custom directive going, does anyone have an exmaple that I can look at? Here's my simple test directive, basically should just dump an div that has the text "this is a chart" in it. How do I include this in directives.js? I'm getting an error like: "Error: Unknown provider: testProvider <- test <- testDirective"
I'm going for something like this plunker:
http://plnkr.co/edit/n7SZpyeQ9nbjVSYA7ibB?p=preview
define(['Console'], function (Console) {
'use strict';
var directive = ['test', function() {
return {
template: '<div></div>',
restrict: 'E',
link: function postLink(scope, element, attrs) {
element.text('this is a chart');
}
};
}];
return directive;
});
Metadata
Metadata
Assignees
Labels
No labels