I am fairly new to AngularJS
(version 1.6), i have a little mission - to implement a new popup modal when clicking an "edit" button that will have some text-boxes to edit something.
I am failing to understand how to call each of js files and because of that i don't able to finish the "mission".
The app is currently built like that (new app- so i need to construct the base to be good).
index.cshtml
Containing this code( on the portion that relevant to my mission)
<p><a href="#" class="btn btn-primary btn-sm" role="button" ng-click="editCard(card)">Edit</a>
main.js
// application global namespace
var sulhome = sulhome || {};
sulhome.kanbanBoardApp = angular.module('kanbanBoardApp', []);
....
boardCtrl.js
(portion from the start of page)
sulhome.kanbanBoardApp.controller('boardCtrl', function ($scope, boardService) {
// Model
$scope.board = {};
$scope.isLoading = false;
function init() {
...
......
There is a boardService.js
also
What i am failing to understand is:
Now i need to add a popup form edit.html
and a controller
and a service
(i want to add another controller cause i want to keep a separation and for understandability also).
How can i connect them all together?
for example: from the boardCtrl.js
call the edit-controller.js
and from the edit-controller
, use the edit service?