Hi all, I'm looking at AngularJS for a new modernised web journey.
I've prototyped something up using angular and router-ui but I'm wondering about how to make the flow between views more dynamic. There seems to be lots of ways, just wondering which is best. The user, filling in their details, will be taken on a very dynamic journey. Depending on their answers, and information we know about them up front, they may have more information requested of them than other users. Question 1: I've declared an app.js with all the routes (ui-router) in, and am wondering the following..... Can I serve app.js up from the server side to the client, and actually build app.js on the fly based on some contextual information. So a customer with certain properties about them would get a different app.js that someone else. This would allow me to customise the stateprovider states as required. Question 2 If a state is always potentially required within the forms wizard, can I dynamically change the ui-sref field based on some form data. E.g. if they select that radio button, the next button takes them to screen y, rather than screen x. Question 3 I've created a number of HTML files for the state templateUrls. Can this contain a controller too? As It would be nice to package the HTML and controller together in a single package. I appreciate that this might be bluring the separation of concerns, but certain .html might need a certain controller, if the client isn't going to see that view, then I'd prefer not to send the controller down within the app.js. Any guidance, help much appreciated. Skynet5 -- 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.
