html - How to create href link inside controller in Angularjs? -


i showing flash error message if mobile number not validated.

flash message "mobile number not validated. click here validate".

but want display same error message "click here" hyper link redirect me top of page.

if (res.json.response.mobilevalidated == false) {        flashservice.error("mobile number not validated." + (<a href="#/otp"> click here </a> ) +" validate", false);        $scope.disabled = function() {            $scope.model.disabled = true;           $scope.title = "cannot access until mobile number validated.";       }    } else {         $scope.model.disabled = false;     } 

how can use html tags inside controller? error message dynamic one.

use ng-include.
js add

$scope.includepath = function () {    `templateurl="..../your template path"`   }; 

html

<div ng-include="includepath" > new html here </div> 

here in case can use <button> if want give click event.


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -