Closed kingvish closed 7 years ago
you mean this.myWelcome ?? if yes, in your view ('./views/app/components/inst_call_visit/inst_call_visit.component.html), where is {{ icv.myWelcome}} ? this mean your "icv" controllername
i wrote this in view for testing purpose:
<div class="form-group">
<label>Visited. By</label> {{ icv.myWelcome }}
<select ng-model="icv.visitor" class="form-control">
<option ng-repeat="x in icv.visitor_collection" value="{{x.id}}">{{x.visitor}}</option>
</select>
</div>
Hi @kingvish
You need to use arrow functions in order to have the same value for this
inside the function as well
Here's a simular issue
You can also check the 10 minute intro to ES2015 tutorial
I want populate some data on init and getting this this is undefined error in console. however, i am getting correct value in alert. I am new to this, please suggest if anything is wrong..