angular-ui-router in iframe exit - angularjs

I'm embedding my angular project on an static html page.
It's my signup wizard, so I have multiple states.
I'd like to leave the iframe after the first state, and redirect the whole page to my URL.
any help ?
This is my iframe :
<iframe src="http://0.0.0.0:9000/#/account/create/infos" width="920px" height="650px"></iframe>

Related

using angular ui-router for login page without including main project template

I used ui-router in my project. "index.html" has my root view that my project template apply in this view.
now I want to load login page in my routing. but I didn't want to show login page with the project template(I want to have a login page without my project template, but will using my routing).
how do I that?

AngularJS: Menu Bar not working

I am creating a web application from scratch. I have login form page which on successful authentication, navigates user to home page where we will have a menu bar and dashboard view. Now user can click on any menu option and navigates between pages.
My problem is i have to use ng-view in home.aspx and not in login.aspx. And all my scripts are included in login.aspx page. When I write routing in the home.aspx ng-view wont work. Can you please guide here?
You can add your scripts to your layout page which is the parent of all pages when you add script over there it will be accessible to all application pages

why angularjs website cannot show ng-view content in firefox?

I am working on a angularjs website and when I Upload my site to public server
it work fine if i open this site by Chrome but in firefox only index content show to user and route change donot add template to ng-view?
there is no error or warning in console only this:
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience
I found very silly bug in fire fox witch add a 'height:0px' to my view class and it make my ng-view invisible ....
I add 'height:auto !important;' style to it to show my content on ng-view .

Prevent AngularJs reload on direct inner page view

For example
In my angular website I have 2 pages called /app , /app/users
If someone visits /app page it displays app.html content
i) When user navigate from /app page to /app/users page angular is fetching users.html and displays inside /app.html 's ui-view.
ii) But if user visits /app/users page directly then my server routing this into users-full-page.html page which have both app.html and users.html codes. Also it have same AngularJs functionality. (Am doing this for SEO purpose)
Now the problem is, In my second case when user visit directly into /app/users page after the page load Angular reloading the users.html content again which already loaded directly from server
So how to prevent this?
Note
Actually I don't have error or problem on Angular code anywhere to show. It's working. I want to prevent one of its feature. When user navigate /app/users page it loading users.html content without problem. But when user visits /app/users page directly I already loaded users.html content in server side itself. So I don't want angular to load it again. So I need to prevent

Forbid AngularJS to reload IFrame

I integrated an iframe to my angularjs app and I also can communicate with my Iframe. I used the following way:
<iframe ng-if="reloadIFrame" class="embed-responsive-item" src="/context/iframe_integration.html"
onload="angular.element(document.documentElement).injector().get('$rootScope').$broadcast('iFrameLoadedEvent', event);">
</iframe>
I catch the broadcasted event in a service and save the reference to it:
// ...
var iFrameInterface = false;
$rootScope.$on('iFrameLoadedEvent', function(ev, event) {
if(!iFrameInterface){
iFrameInterface = angular.element(event.target)[0].contentWindow.iFrameInterface;
// ...
The problem is the following: If I navigate to another position in my app and go back to the site where my iframe is integrated the iframe is reloaded and my reference to it is old. I can update the reference to my iframe interface but the question is "Is it possible to integrate the iframe once and never reload again?"
I don't want to reload the content of the iframe everytime if I navigate to another page and reload it if I come to the page again.
Thank you...

Resources