Answer the question
In order to leave comments, you need to log in
How to properly pass data between controllers in AngularJs?
In an application on Angular I use ui-router. Roughly speaking, the main screen is divided into two parts: sideBar and main. Example:
.state('node', {
url: "/node",
views: {
"main" : {
templateUrl: '/templates/node/node.html',
controller: 'NodeController',
}
},
"sideBar " : {
templateUrl : '/templates/sideBar.html',
controller: 'sideBarController',
}
}
})
Answer the question
In order to leave comments, you need to log in
read here - stepansuvorov.com/blog/2014/09/angularjs-data-transfer
I hope you will emphasize a lot for yourself.
The first method is better, because then the data will be located on "its own shelf".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question