Dynamically add switch in ionic corner
1 answer
You cannot dynamically add to HTML with angular code.
To make it work, you need to compile it using the $ compile dependency
If you want to get around this, you just add your google code to your HTML with the condition
<div ng-if="maxScore===1"> <ion-toggle ng-change="pushNotificationChange(this)"></ion-toggle></div></div>
to your controller, just change your code which instanciate maxScore to $ scope.maxScore
+1
source to share