Add, Remove, hide and show html in a super set of html template

74 views
Skip to first unread message

Pushpendra Kumar

unread,
Jan 8, 2014, 9:13:50 AM1/8/14
to ang...@googlegroups.com
Hi All,
          I have to develop a large application containing around 30 modules.
          I have create page almost same for all modules.

         I want to create only one create.html and add/remove/modify/hide/show html elements for different modules.
         Please suggest me approach to update same html file for all modules dynamically.
         This file may be different on basis of metadata, html elements for all modules.

         Please suggest a way.


Thanks in advance,
Pushpendra 

Pan Stav

unread,
Jan 9, 2014, 1:45:29 AM1/9/14
to ang...@googlegroups.com
And we're back. Did you try using a directive, or an HTML generator like Jade, or the templateCache, like was suggested?

Pushpendra Kumar

unread,
Jan 9, 2014, 2:25:03 AM1/9/14
to ang...@googlegroups.com
Thanks Pan,
 My points are as:
 1. We can not use jade because its requiring another js ie. node.js and I have java spring on back-end.
 2. Template cache is something different. Its used only for caching your template while my need is different.
 3. I can not use directive because I have a long html page containing around 30-40 controls like- datepicker, dropdown, multiselect, dynamic adding list items, textarea, input fields, buttons and many more.

I redifine my problem:   I have a huge html page and its almost same for 30 modules.
 This html page has differences like metedata, number of html elements, type of html elements, less or more html elements for all 30 modules.
 Now I want to make a superset of html and reuse it for all 30 modules by modifying on route calling for each module.

Please go through this and suggest me best way.


Pushpendra 

Archana

unread,
Jan 9, 2014, 2:40:13 AM1/9/14
to ang...@googlegroups.com
Hi. yes you can do. in one module you can have routings for different views and controllers. once you go through sample application in github and you can know the structure
how the routings are done.

Pan Stav

unread,
Jan 9, 2014, 2:43:56 AM1/9/14
to ang...@googlegroups.com
If using a meta-directive (which then initiates other directives) is irrelevant, i'd suggest looking for a jade-like generator that builds molecular html.


And if you have you HTML atoms, you could build some logical html patcher by yourself, doesn't sound too complicated (coming from an amateur node.js programmer with no experience with java).

Sander Elias

unread,
Jan 9, 2014, 3:06:38 AM1/9/14
to ang...@googlegroups.com
Pushpendra,

Ah, so you have now problems maintaining your application that is build using cut and paste, and now want a cut and past solution for it?
Sorry, that's not the way it works.
You have to learn the framework, and do the hard work yourself, or hire one of us, and let us do the hard work for you.

Regards
Sander

Pushpendra Kumar

unread,
Jan 9, 2014, 3:24:48 AM1/9/14
to ang...@googlegroups.com
Hi,

I am planning to go through with following approach. Suggest me whether its correct or not?

1. Have the superset of html of page for all entities like create.html.
2. Get metadata from database or javacsript factories.
3. Use switch case, if-else and show/hide in html page for conditional rendering.
4. Create directives for highly re-usable and variable html controls.
5. Handle rest of variation in directives.
6. Create generic factories/services and models in javascript.


Pushpendra


--
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 angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Pan Stav

unread,
Jan 9, 2014, 3:53:22 AM1/9/14
to ang...@googlegroups.com
Sounds like angular. Do update on your progress.

שתהיה טיסה נעימה,
פאן - סתו.


--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/yEntNGWY1uA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.

Pushpendra Kumar

unread,
Jan 9, 2014, 4:28:39 AM1/9/14
to ang...@googlegroups.com
Thanks Pan. I am going for this approach.

Pushpendra
Reply all
Reply to author
Forward
0 new messages