Hi, I am pretty new to angular, so I am not sure how I should structure my 
UI. Normally in Backbone, I would split the UI into different parts and 
define Backbone.View for each part and there is one "master view" to 
control everything. When I switch to Angular, I tend to use directives for 
this

Assume that I have this kind of page layout

<https://lh3.googleusercontent.com/-FqbpZVA2gNQ/VbIMQJ5hirI/AAAAAAAAAo0/eoBxm-071nE/s1600/Untitled%2BDiagram.png>























And this is the code: http://pastebin.com/TmZfx5mR

Basically, I am using an isolate scope for the main layout directive and 
all other child directives inherit its scope (and access the main 
controller through vm variable attached to the scope). The layout directive 
will be responsible for loading all the initial data and pass it down to 
the child directives. The layout also acts as a mediator to handle 
communication across child directives

It works quite well so far. The only problem that I have to make sure that 
there is no naming conflict across all the child directives

Is my approach reasonable and scalable? Are there any potential problems (I 
am pretty sure there will be some because I am very new to Angular) with my 
approach?

-- 
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.

Reply via email to