Image not showing in dashboard page1.html
-
I have used the following code in the Dashboard play area and it works but when I place this in the page1.html the images do not get found.
<ma-get-point-value point-xid="DP_514615" point="motor1" realtime="realtime"></ma-get-point-value> <div layout="column"> <div> <strong>Pump 1:</strong> <ma-switch-img point="motor1" ng-click="motor1.toggleValue()" src-false="img/ligthbulb_off.png" src-true="img/ligthbulb_on.png" default-src="img/close.png"> </ma-switch-img> </div> <md-switch ng-model="motor1.valueFn" ng-model-options="{getterSetter:true}"> Pump 1 </md-switch> </div>
-
The reason those images are not found are those src paths are relative to the custom dashboard that is using page1.html while the the image actually exists in the /mdAdmin folder that contains the dashboard docs pages.
So you would need to jump up one folder from your custom dashboard then into /mdAdmin to find those images. This worked for me:
<ma-switch-img point="motor1" ng-click="motor1.toggleValue()" src-false="../mdAdmin/img/ligthbulb_off.png" src-true="../mdAdmin/img/ligthbulb_on.png" default-src="../mdAdmin/img/close.png">