I've dipped a lot (lately) in the corner, but I'm struggling with a way to design my layout
For my site I have created a menu containing an input field and some buttons. The idea is that the input field to be mixed with both of the buttons should be facilitated by the function. So ask for visual A, the input field should function as the search bar only. If the user clicks on a button then the input field value should be used as the basis for creating a new item in the second view.
The search function works well for A view, but I switch the buttons I doubt (or know, but do not know how to know) This is because the outlined button view (ng - view) and thus is not the controller
I have searched for "many controllers / ideas", where there is a difference in adding suggestions to a function or creating a service. The problem is that I do not know that all Sector Good Practice what or if it is necessary for my case.
Menu + input field is another view. It should be its own controller based on the route - For example how to use $ routeChangeSuccess (but not ng-switch), see $ ($ routeChangeSuccess, ...) - You can use that switch to switch between the appropriate HTML / template. If your templates are large, you can include ng-inside ng-switch directives. Otherwise, do not bother, and HTML inside each ng-switch-in-in-line
No comments:
Post a Comment