Part 3 - How to create a login page using AngularJS in MVC4 application

In this post, I would like to explain Part 3 - How to create a login page using AngularJS in MVC4 application.

This is our third Post about AngularJS. Here I have explained a little about AngularJS and What we will learn in this section part by part. 

In Part1 of this post we configured AngularJS in MVC4 application. In this part (Part 3) I am going to explain how to create a login page using AngularJS in MVC4 application.

Part3 - Create Login Page

[N:B: For test you can get username & password from register here]

{{Message}}
Username required
Password required
Part 3 - How to create a login page using AngularJS in MVC4 application
 
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
</head>
    @* Here  ng-app="MyApp" is used for auto-bootstrap an AngularJS application. here ng-app="MyApp" means <body> element is the owner 
    of AngularJS application*@
<body ng-app="MyApp">
    @RenderBody()

    @Scripts.Render("~/bundles/jquery")
    @* Add Angular Library Here *@
    @Scripts.Render("~/bundles/angular")
    <script src="~/Scripts/MyApp.js"></script>
    @RenderSection("scripts", required: false)
</body>
</html>


Posted By :