AngularJS nested modal templates - angularjs

I have a spa developed with AngularJS (routing with ngroute). Every template have the menu, in the menu there is a back button. I want to return to the previous view with he's state (information, scroll in the page etc). If I code every button in the menu to open the next template in modal that have dimension of full screen, and the back button just close the current modal. This method can do a memory leak?
This case is an hybrid application running in the tablet, the back button is in the menu of application not that of the browser.

Why don't you use $window.history.back();
Why don't you create a template for the menu and include it into your views by using ng-include?

Related

Angular ui router and implementing overlay with back button

I'm having issues with an overlay panel.
The first page loads, you click a link... It pops up an overlay, the router fires a state and controller, and it populates the contents of the overlay.
There is a back button on the overlay, I trigger the overlay to close, call window.history.back() which sends the router off to load the new url (previous url) and it runs it through the router again but obviously refreshes the backing page in doing so.
So the end result is when you press a link, the overlay slides out beautifully, you then press back, the overlay slides back in, it then refreshes the page. You'd think then, why not just say in the controller, if there was an overlay and now there isn't do not change the view content... I can't, as the template stuff gets placed into the ui-view which is remove all my content.
So I need a way of changing the url without running through all of the controller stuff again so to avoid the template being inserted.
Any ideas on how to do this? Or examples of it working somewhere else.

Ionic + Angular UI-Routing: How to delete Back Stack?

Im working with the Ionic-Framework and AngularJS.
If you create the Ionic sidemenu sample project:
ionic start myApp sidemenu
You will get a small example application which shows my exact problem.
You can try out the behaviour here: Plunker
If you open up the Side-Menu and navigate to several locations everything
is put on the Back-Stack. How can I prevent that behaviour for special pages?
For our example lets say i always want to completely delete the Back-Stack
when the "playlists" page is called. My Application will run on mobile devices only and its very untypical to be able to press the back button in the main menu and be navigated to the last opended page.
I want Angular UI-Routing to simulate the Android Backing behaviour.
How can i achieve that?
Another problem is that the hardware back button seems to work different than the back button of the navigation bar. You can see that in the browser. If you navigate to a link from the side menu there wont appear a back button in the navigation bar (Like it should be!). But when you press the browser back button, suddenly a back button in the navigation bar appears (very uncool!). How to prevent that?

Reload store / refresh grid in main window when button is clicked in Modal window in EXTJS

I am facing a problem in my EXTJS application.
Basically there is a grid which displays all the projects. In my main menu which is a different file, I have "Add Project" link. On clicking this, Add Project modal window opens irrespective of any main window which may be project list or dashboard currently displaying in browser.
Now I want if the main page is the Project List in the browser and I open the Add Project modal, When I will click Add button, I want the grid / store in the project list page should reload or refresh.
I am not getting any way to get a reference to the project store in the project list page from the Add Project modal window.
Can any one please help me on this.
Thanks in Advance... :)
You can use Ext.getStore('your_store_name'); to get a reference to your store.
The sencha grid tutorial covers this: http://docs-origin.sencha.com/extjs/4.2.2/#!/guide/grid

AngularJS UI Router: Not registering history state when navigating to tabs

I have an Angular app that uses Angular UI Routing to provide states. The basic routing between pages works.
The app has multiple pages, and one of those pages has tabs. When I navigate to the page, I get a nice animation, and the back button appears in the header.
But when I navigate to the tabs page, the back button doesn't appear and there is no animation to the page. Is it possible to get an animation when I navigate to the page that has tabs, and to have the back button appear?
UPDATE:
Made a new example that better shows what I mean:
http://plnkr.co/edit/jKII2S3uEnEOVDy9WBA2?p=preview
look into this -
http://ionicframework.com/docs/angularjs/controllers/view-state/
The View Service is leveraged by the Ionic's tabs directive, which has
child tab directives. Each tab requires its own history stack (forward
and back buttons), and to do so each tab has its own navView
directive. This system is similar to what you see in modern apps, such
as iOS's App Store, or Android's Play Store.
each tab within tabs has it's own history stack, therefor your nav-bar history is reset when you enter a tab for the first time.
it is managed with a $historyId value on the scope of the directive. maybe you can work around that with the use of these value.

ASP.NET AJAX Calendar in Modal Popup with Update Panel

I am implementing a grid view edit and delete functionality using Modal Popup.
I am using ASP.NET Ajax Calendar in Ajax Modal Popup inside an update Panel, but calendar is not showing at the proper place, some it not even show at all, when i click on its TargetControlID (a Text Box).
i also tried to use, following scripts as i googled but NOT solved the issue -
Any Solution??

Resources