3
Answers

merge two projects

 
I have Two Projects and i want to merge them ine one File JavaScript
 
Project : 1
 
File : App.Js 
 
var app = angular.module('PegaseApp', ['ngTouch', 'SignalR', 'ui.grid', 'ui.grid.selection', 'ui.grid.resizeColumns', 'ui.bootstrap', 'ui.bootstrap.datetimepicker', 'AxelSoft']);
 
File : Intervention.Js 
 
 
angular.module('PegaseApp')
.controller('MainCtrl', ['$rootScope', '$scope', 'HubManager', function ($rootScope, $scope, HubManager) {
........
} );
                                       Project : 2
 
 File : spl.Js
 
angular.module('myApp', ['bgDirectives']);
angular.module('bgDirectives', [])
.directive('bgSplitter', function () {
..........
}); 
 
The expected result is to combine this two projects in one File Javascript and one File Html 
 
 
 

Answers (3)

0
Photo of Benmakhlouf Saad
NA 129 5.6k 8y
Yes The result in Html File must be one <ng-app> contains both module
0
Photo of Tejas Trivedi
NA 1.6k 45.1k 8y
Hi,
 
Instead of merging project, what i suggest let it be the seperate module and inject dependacy of the application module to the other one.
 
For example
 
  1. var myApp = angular.module('myApp', ['myapp1']);  
 
 In above example 'myapp1' is sepearate angular js project module.
 
Hope, this will help you out. Feel free write if more information is required.
 
Don't forget to mark as answer if this helps. 
0
Photo of Madhanmohan Devarajan
NA 6.5k 471.5k 8y
Ben,
 
I think you want to combine methods and properties of two project into one module rite?
 
PegaseApp and myApp together rite?