

It also needs to set up some special AngularJS directives so that Angular will know where to display the custom views.įirst, the HTML page imports the JavaScript files: The page must import the angular.js framework and our custom JavaScript Code, in viewstack.js. The index.htm or index.html is often the main page of an HTML site. I was successful and you can view the simple app. I wanted to see if I could use a similar approach in an HTML5 based apps. There are a multitude of uses for this component. When the user successfully authenticates the application will tell the ViewStack to change from the login view to main application screen. One use case for a ViewStack might be to show a login screen in one view and the main application screen as another view. In the MX Component set the TabNavigator combines a ViewStack with a ButtonBar for us. The Flex ViewStack does not inherently include any way to navigate between views because that is usually done through user interaction, either through something in the view or through a TabBar.

Only one view is displayed at the same time. It allows multiple views to occupy the same the same space in an application at the same time. One of the common navigator components in a Flex Application is known as a ViewStack. My one caveat is that I am not yet an expert in AngularJS so my understanding of what goes on under the hood may be wrong.
#Angularjs buttonbar how to
This is a tutorial on how to get ViewStack like functionality within an AngularJS HTML project.

I decided that I like a lot of things about AngularJS. The book will be about converting a Flex application to JavaScript. I am trying to determine what I can use in a book I'm writing entitled "Life After Flex". I've spent the past two months diving into as many JavaScript frameworks as I could find time for.
