A
A
Anton Artyomov2016-06-21 16:38:30
JavaScript
Anton Artyomov, 2016-06-21 16:38:30

How to develop with Angular?

Hi all.
I can't figure out how to properly develop a web application using Angular.
In particular, I'm interested in the following situation:
there are several sections on the page. In one section, let's say I click on the elements of the tree, and in other sections the information should be updated in accordance with the selected element of the tree.
So it's not clear to me, should all three sections be within the same controller, or can all sections be in their controllers?
Now I have a tree (JsTree) generally outside the controller and it has sets of its own events. In the "click" event of the JsTree, I want to somehow call the controller in which the page section needs to be updated. But according to stackoverflow, it's not good to call controller methods from outside. Type means incorrectly builds application.
Can anyone explain the concept clearly? How to correctly implement my task?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Yarkov, 2016-06-21
@ArtyomovAnton

JsTree put in the controller and pull ONLY from there. And update data in other sections using services that are injected into each controller that is responsible for the section.

A
Anton Artyomov, 2016-06-21
@ArtyomovAnton

Or can someone share links to Russian-language materials on Angular, which really helped you figure something out?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question