ng-init --> we are not use this directive often. it is only for
<div ng-app="myApp" ng-controller="myCtrl">
{{firstName+" "+lastName}}
</div>
<script>
var app = angular.module("myApp",[]);
app.controller("myCtrl", function($scope) {
$scope.firstName = "Terence";
$scope.lastName = "Liu";
});
</script>
No comments:
Post a Comment