Any time, I make code changes in .hmtl file or the .js file, the browser still renders the old code and my new code changes don't show up in the browser result.
For example, I add the following 2 lines of code in .html file.
<div class="control-group"> <label class="control-label">First Name</label> <div class="controls readonly"> {{profile.FirstName}} </div> </div> <div class="control-group"> <label class="control-label">Last Name</label> <div class="controls readonly"> {{profile.LastName}} </div> </div>
Then I do the following:
What am I doing wrong?
the changes doesn't reflect in browser. You need to restart the application to reflect the changes.
Unlike PHP, Angular is a frontend framework. All frontend code is visible to the end user. All network calls are also visible to the end user, even if it's encrypted with HTTPS.
One Way Data Binding However, in AngularJS 1.5+, there is a new one-way data binding that we can explore and also use to improve the performance of our AngularJS applications. A new syntax expression for the one-way data binding is the use of < notation. For two-way data bindings, the = notation is used instead.
Hit F12 in your browser to bring up the Developer Tools. Disable the Cache. Reload your page.
Besides using Dev Tools to make sure the cache is disabled, you can edit your Web.config
file and tell IIS to not cache your Angular files:
<configuration> <!-- Disable IIS caching for directories containing Angular templates and scripts --> <location path="app"> <system.webServer> <staticContent> <clientCache cacheControlMode="DisableCache"/> </staticContent> </system.webServer> </location> ... </configuration>
My Angular root directory is app/
. You may need to modify according to your file structure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With