Angularjs with initialize the variable

<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>

<div ng-app="" ng-init="firstName='John'">

<p>The name is <span ng-bind="firstName"></span></p>

</div>

</body>
</html>

Comments

  1. Wow, luckily ,I love this article, thanks you for the publish.Keep it up.
    scr888

    ReplyDelete
  2. Anyways excellent post some great tips.I hope these tricks will help me.
    คาสิโน

    ReplyDelete

Post a Comment

Popular posts from this blog

AttributeError: Got AttributeError when attempting to get a value for field `abc` on serializer `PfleSerializer`. The serializer field might be named incorrectly and not match any attribute or key on the `QuerySet` instance. Original exception text was: 'QuerySet' object has no attribute 'abc'.

ImportError: No module named regex