Monday, September 28, 2015

Angular Cheat Sheet

                                      

Allow only numeric data

<input id="primaryLocationNumber" ng-model="PrimaryLocationId" type="number" class="form-control" />


Set initial selected value




 //model for storing initial value
 $scope.SelectedOrganization = {};
//get data
  $scope.Organizations = response.Organizations;
Set source for Iframe
 
$scope.SelectedOrganization.selected = $scope.Organizations[0];




 <iframe name="frame1"  ng-src="{{ reportUrlEdrep }}"   ng-show="currentReport === 1"></iframe>

Javascript
  $scope.reportUrlEdrep =$sce.trustAsResourceUrl("http://localhost/EdRepReports/MainMenu.asp?OL-BECode=LOMA&OL-EdRepID=" + $scope.organization.LomanetEdRepId);

Set HRef for anchor
<a ng-href="http://www.gravatar.com/avatar/{{hash}}">link1</a>

No comments:

Post a Comment