Skip to content Skip to sidebar Skip to footer

Retrieving The Value Of Ng-model From Directives Template To Another Html File

I can't retrieve the ng-model value of my template-url from my name directive. team-two.html
<

Solution 1:

Since you use the controllerAs in the directive need to reference that when you are accessing variables from the html.

ng-model="vm.firstname"

<input type="text" name="firstname" class="form-control" placeholder="Enter 
 your first name"
     ng-model="vm.firstname"
     ng-minlength="2"
     ng-maxlength="20"
     required
     ng-pattern="vm.namePattern"/>

Post a Comment for "Retrieving The Value Of Ng-model From Directives Template To Another Html File"