In one Directive (the component) to connect to another in Angular?

I have 2 of the Directive and of 2 file (login.html and main.html)
Inside the html files we need to include other components

Now the logic of this, but the components inside are not connected:
index.html

<login-content></login-content>


app.js
window.app = angular.module("myApp", []);
loginComponent import from './angular/directives/loginContent.js';
app.directive('loginContent', loginComponent);

// ..


loginContent.js
export default function() { 
 return { 
 restrict: 'E', 
 scope: { 
 info: the '=' 
 }, 
 templateUrl: 'public/html/login.html' 
 }; 
}


login.html
<div class="row" ng-controller="LoginController">

<navigation></navigation>
<widgets></widgets>

</div>


The problem is how LoginController should be able to connect these directives(components), explain ?

LoginController
/**
 * Controller that handles a form feature entrance and reception
 * @param {object} $rootScope - the General scope of the templates for the app 
 * @param {object} $http ajax object to work with http requests
 * @param {object} $compile - object to add a new DOM and link handlers
 * @param {object} $scope - local scope of the template relative to the component controller
 * @param {object} dataService - service, communicating between controllers
*/
export default ($rootScope, $http, $compile, $scope, dataService) => {

 // tried to do so
 app.directive('navigation', require('./../directives/navContent.js'));
 // but writes that the app is empty and there is no method 

}


and as such, can be nested components to connect?
for example, in determining the components of the widgets inside the html template may be a component pagination, and then how would he connect component widgets?
July 4th 19 at 23:47
1 answer
July 4th 19 at 23:49
Solution
So it will not work. You are trying to do something like lazy load.
Declare all the guidelines before starting the application.
still can't see when viewing the html code in the console
remains navigation /navigation
although they were replaced by html code - lon34 commented on July 4th 19 at 23:52
no, when I was not using directives, and components of something earned - lon34 commented on July 4th 19 at 23:55

Find more questions by tags Angular