Hello Sander,

The easiest is, splitting out each 'tab' into it's own template, and load 
> them in by using ngInclude. That will not carry over neatly to NG2.
>

I don't like the ngInclude way because I want my app to be "monolitic". 
This means, it should fit on a single html file, and not try to download 
other files to "inject" them.
 

> A better solution would be, use the new (1.5 next release) .component 
> <https://docs.angularjs.org/api/ng/type/angular.Module>. You can then 
> choose to have shared scope, so it does not mess your stuff up. 
> I would say, give it a spin. Create a copy of your project, split out the 
> templates and dable around with the possibilities. Worst what can happen, 
> you loose a bit of time.
>

What I did is to create a custom directive to each "section" of the page. 
This mean, one directive for each tab. I have doubts about how good or bad 
was this approach until I find this article:

http://jan.varwig.org/archive/angularjs-views-vs-directives

Seems that I fall into one of the issues newbies usually has. My code now 
it's exactly how I posted on my first message. What do you think about that 
approach?


Anyway, I checked your link, and I can't see the .component directive.

Many thanks. 

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