On a keyboard event I want to change the ng-include
directive's src
value dynamically.
Here is a code example that could help you:
<div class="example-animate-container" ng-include="{{template.url}}">
Then in directive or controller
$(document).on("keydown", function () {
template.url = "put the value here";
$scope.$apply();
});
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