I create a Demo App with AngularJS in Sharepoint 2013 Environment.
the Demo App works well with Both FireFox and IE Browser. However the app always refresh and reload the content when i click on any button in Safari.
here is my Code
<div ng-controller="AddContactControl">
<button ng-click="showAddModal(contact)">Add Contact</button>
</div>
the root cause of issue is that the button had been automatically assigned with type "submit" if type is not assigned at design time. as a result, the click will trigger the post back.
the fix is quiet simple
<div ng-controller="AddContactControl">
<button ng-click="showAddModal(contact)" type="button">Add Contact</button>
</div>
another fix is change to button to a anchor
<div ng-controller="AddContactControl">
<a ng-click="showAddModal(contact)" >Add Contact</a>
</div>
From my point Angularjs Training In Hyderabad has only difference. It is learning at Hyderabad helped me in many ways and learning from the informative weblogs like this helped me to connect to more examples, realtime scenarios and case-studies. Thanks a lot.
ReplyDeleteThanks. Worked like a charm
ReplyDeletethank very much, this solved my problem
ReplyDeleteNice thanks
ReplyDeleteExcellent blog with lots of information, keep sharing. I am waiting for your more posts like this or related to any other informative topic.Amazing web journal I visit this blog it's extremely marvelous.
ReplyDeleteSalesforce Training in Chennai
Salesforce Online Training in Chennai
Salesforce Training in Bangalore
Salesforce Training in Hyderabad
Salesforce training in ameerpet
Salesforce Training in Pune
Salesforce Online Training
Salesforce Training
It is my first visit to your blog, and I am very impressed with the articles that you serve. Give adequate knowledge for me. Thank you for sharing useful material. I will be back for the more great post. PS5Home
ReplyDeleteHey, thanks for the blog article .Really thank you! Great.
ReplyDeletepython training
angular js training
selenium trainings
This post is so interactive and informative. keep update more information...
ReplyDeletedevops training institutes in hyderabad
Hey, thanks for the blog article.Really thank you! Great.click here for more information
ReplyDelete