Reputation: 35
I want to override in a ViewModel the way is showed a picture.
According to the DevelopmentView: Picture for foto2
<div ng-show="ViewModelRoot.VM_Status.vmEditAlumno_foto2_Visible">
<table>
<thead>
</thead><tbody>
<tr>
<img ng-src="{{StreamingViewModelClient.GetVMImageUrl(ViewModelRoot.Curr_vmEditAlumno(), "foto2")}}" img-responsive class="vmImage" />
</tr><tr>
<input type="file" onchange="angular.element(this).scope().onFileSelect('vmEditAlumno.foto2', angular.element(this).scope().ViewModelRoot.Curr_vmEditAlumno().VMClassId)" id="vmEditAlumno.foto2" ng-show="ViewModelRoot.VM_Status.vmEditAlumno_foto2_Enabled" />
</tr>
</tbody>
</table>
</div>
I set "Content Override" in the column and create a AngularUIOverride tag with value "Foto2Alumno.cshtml".
Not it gets the new file "Foto2Alumno.cshtml", as if I change something in that file it is showed, but the picture from the command GetVMImageUrl isn't show
What am I missing?
Thanks
Upvotes: 0
Views: 26
Reputation: 35
It was a problem with double quotes ("). I changed them to single quote (') and now the image is shown.
Wrong: GetVMImageUrl(ViewModelRoot.Curr_vmEditAlumno(), "foto2")
Right: GetVMImageUrl(ViewModelRoot.Curr_vmEditAlumno(), 'foto2')
Upvotes: 1