Browser Refresh Issue Angular Js - angularjs

Hello everyone :)
I'm starting with angularJs but I'm facing an issue with a directive I have created.
The code is working but when I change something on the directives html code/template and then refresh the page in the browser nothing change.
The only way I have to see the changes is to restart the browser in private/incognito mode.
I don't really know how to solve this issue.
Thanks for the help ;p.

Sounds like the browser is using cached version.
In chrome:
open developer tools
Select 'Network' tab
You'll find a checkbox called 'Disable cache', tick that
This will make sure nothing will be cached while the developer tool is open

fyi
if the developer tools are open and refresh the page, the cache of chrome get cleared.
That's an option and I think it is active.
greets Christian

Related

Web site added to home screen takes to long to show updates

I made a site using React and i added it to the home screen using Chrome and it works fine, but my problem is, when make a change to it, if i access it on the web it shows right away the changes, but on the home screen "App" it takes a long time for the changes to be visible.
Is there a way to force the updates, maybe delete the cache or force a ETag change?
Thanks in advance
#Franmcod, could you try the following:
Push F12 or Ctrl+Shift+J to "Open Developer Tools" on Windows, then you can right click on the refresh icon and select 'Empty Cache and Hard Reload'. this should remove what's cached in chrome and load the newer web page after you make the changes. for Mac use: Cmd+Opt+I.
Adam

Angular App not updating when source files have been changed

I'm trying to develop my first Angular application, however quite often, when I change the source files, the app isn't updating.
I am using Firefox and the Xampp stack. If I change, for example, a view or even a controller, when I refresh my page, I am not seeing the updated changes. I just opened Chrome and it is showing the updated changes.
Is there some sort of caching going on, or any gotchas that I should know about?
Keep your dev-tools open, right-click on the refresh icon, and click 'empty cache and hard reload'. That should do it.

Angularjs clear browser cache

Each time i do changes in my Angular template (html file) i need to clear my browser cache and refresh the browser so the changes can be applied. Is there a way to avoid that ?
I'm using Chrome and Firefox.
Thanks
If you have the developer tools console open, then press F1 and select 'Disable Cache (while devtools is open)' (for chrome)

Closing the ui-bootstrap tab changes the ui-router state to default state - happens after upgrade ui-bootstrap to 0.12.0

The issue is, If i close the tab, the state(ui-router) changes to the default state. It is hard to explain the problem, so i created the simple plunker #
http://plnkr.co/edit/Yigj4VR10zTAMG9DQo6C?p=preview
If you close any of the tab in the settings page then you are taken to the home page. I expect to stay on the settings page with the first tab being selected after closing the tab.
If you comment the 0.12.0 version in the plunker and un comment 0.11.0 version, then the application works as expected.
I think the issue is to do with the fix for the following bug -
https://github.com/angular-ui/bootstrap/pull/2763 (or) `https://github.com/angular-ui/bootstrap/issues/2155`
There is no error message printed on the console so it is hard to identify the issue by myself.
Any help greatly appreciated. Thanks.
This is finally resolved after upgrading to angular 1.3.15. Please see the comment on git hub.

AngularJS app is not loading on Safari (iOS 5.1.1) back button. Any suggestions?

I've ran into an issue with Safari on iOS 5.1.1 and Angular where I am doing paginated results. After I decide to leave the page that is hosting the app, and then come back to the page by using the browser's history back button.
The application is not initialized so as I scroll again, the pagination functionality is not triggered.
Since 5.1.1 doesn't provide a web inspector, I had to rely on console.log to print events that I want to see that it's executing. On initial load, I see everything ok, but when I am back through the back button nothing fires.
My usual ways of fixing this are not working. Here are the things I've tried:
Used manual bootstrapping of Angular app
Made the page not support caching and expire the page as soon as it's rendered.
Neither of these helped, which is why I am here asking for some suggestions. Unfortunately it's not a very easy thing to replicate through a Fiddle or a hosted HTML file so I am unable to provide one. Hoping that some of you may have experienced this before.
Thanks in advance for any help.
Answer is quite late and I hope you found a solution already but it might be useful for others.
Unfortunately I won't be able to answer why the app is not initialized (due to the lack of code) but I can give you some tools/tips to ease the debugging (assuming you have the iOS simulator).
Debuging on mobile safari can be done either :
with weinre and get the features of the web concole,
or by enabling remote debugging in Mobile Safari itself, see here
Yea, same problem here with iOS 7. It must send the DOM structure over before running any javascript. Kinda pointless...
Since the problem is with mobile safari and since it supports popstate event, you can use this event to detect when the user is back in combination with $location.path(), for example:
$(window).bind("popstate", function () {
alert(location.pathname + $location.path());
});

Resources