Hi,
In our application we have app.js and the high level content is below.
var app = angular.module('testApp', [ 'ngResource', 'ngRoute',
'ui.bootstrap', 'infinite-scroll']).config(function($locationProvider) {
$locationProvider.html5Mode(false);
});
var appEmail = angular.module('testAppEmail', ['mnpi', 'ngTagsInput',
'ui.tinymce']);
This app.js is been included in all the html files.
I would like to include treeGrid in one of the html, say treeTest.html,
hence, added tree-grid-directive.js in the treeTest.html.
We have a separate js (treeTest.js) for this html file.
treeTest.html,
<html ng-app='testApp'>
<script src='js/jquery/jquery-1.11.1.min.js'></script>
<script src='js/jquery/jquery-ui-1.10.4.min.js'></script>
<link rel="stylesheet" href="css/jquery-ui.min.css" />
<script src="js/angularjs/angular.min.js"></script>
<script src="js/angularjs/angular-resource.min.js"></script>
<script src="js/angularjs/angular-route.min.js"></script>
<script type="text/javascript"
src="js/angularjs/tree-grid-directive.js"></script>
<script src="js/test/controllers/treeTest.js"></script>
<body ng-controller="treeTestCtrl">
<div ng-if="loadingIsDone">
<tree-grid tree-data="tree_data"
tree-control="my_tree"
col-defs="col_defs"
expand-on="expanding_property"
on-select="my_tree_handler(branch)"
expand-level="1"
icon-leaf= "">
</tree-grid>
</div>
In treeTest.js,
angular.module('testApp').controller(
//app.controller(
'treeTestCtrl',
function($scope, $location, $http, $modal, $log, $window,
referenceDataService, windowService, dealDataService) {
// loading data for the tree and set the JSON array for the tree
}
Now, treeGrid works fine if i include the treeGrid directive in app.js as
below.
var app = angular.module('testApp', [ 'ngResource', 'ngRoute',
'ui.bootstrap',
'infinite-scroll',*'treeGird'*]).config(function($locationProvider)
{
$locationProvider.html5Mode(false);
});
But the problem is, since it is added to app.js, it is expected to include
the tree-grid-directive.js in all the pages.
Is there any way, I can include the treeGrid directive without adding in
app.js so that I dont have to include the tree-grid-directive.js in all the
pages.
Thanks,
Baskar.S
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.