AngularJs inject Module into another Module [Resolved]

Posted by Syedshakeer under AngularJS on 8/18/2016 | Points: 10 | Views : 662 | Status : [Member] | Replies : 1
How to inject module into another module?
example:
1) created myModule1 in module1.js file

var app = angular.module('myModule1', []);


2) created myModule2 in module2.js file

var app = angular.module('myModule2', []);

Now i want to inject myMoudle1 in myMoudle2 ?

Syed Shakeer Hussain


Responses

Posted by: A2H on: 8/18/2016 [Member] [MVP] Silver | Points: 50

Up
1
Down

Resolved
You can inject the modules in angular like given below

var app = angular.module('myModule2', ['myModule1']); 



Thanks,
A2H
My Blog

Syedshakeer, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response