Hi Friends,
First of all i am sorry i know this type of questions should not be ask here.
But after spending my 2 hours i am forced to ask it here.
What I want is to create a custom angular directive which can be put in separate js file and can be used anywhere by just referring it
I don't want to make my directive on each app let's say I have app named as MYAPP
then i can create directive on app level like below
var app = angular.module('MYAPP',[]);
app.directive('mydiretive',function(){
})
i dont want to do above one.
I want something like below viz directive in a separate js and inject in module initialization.
var app = angular.module('MYAPP',['mydiretive']);
How to achieve it guys please help