I am building a new project using angularjs and PHP(codeigniter). I am facing an issue with the content or changes I make on both client-and serverside, but the changes are not being reflected.
Does this have something to do with the cache?
The browser uses template caching, which should be cleared upon making changes to templates. See this question . You can do the following to make your life easier when developing:
Yet a more convenient way is to:
Eg for Chrome
CTRL+SHIF+J and on the network tab check 'Disable Cache'
Yet may be better still to:
This is done via $templateCache.remove()
Try this if you are also having issue with Angular default change detection mechanism. In my case, in my ionic4 Project default change mechanism of Angular was somewhat not working properly so I triggered it manually.
constructor(private ref: ChangeDetectorRef) {
ref.detach();
setInterval(() => {
this.ref.detectChanges();
}, 500);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.