This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define(['app'], function (app) { | |
| app.controller("orderCtrl", function ($scope, $localStorage, $http, cnst) { | |
| $scope.k2 = "i am signup"; | |
| $scope.orders = []; | |
| $http.get(cnst.serviceBase + 'api/orders').then(function (result) { | |
| $scope.orders = result.data; | |
| }); | |
| }); | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <input type="text" class="form-control" placeholder="Username" data-ng-model="registration.userName" required autofocus> | |
| <input type="password" class="form-control" placeholder="Password" data-ng-model="registration.password" required> | |
| <input type="password" class="form-control" placeholder="Confirm Password" data-ng-model="registration.confirmPassword" required> | |
| <button class="btn btn-lg btn-info btn-block" type="button" data-ng-click="signup()">Submit</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define(['app'], function (app) { | |
| app.controller("signupCtrl", function ($scope, $localStorage, $http, $timeout, $state, cnst) { | |
| $scope.savedSuccessfully = false; | |
| $scope.message = ""; | |
| $scope.registration = { | |
| userName: "", | |
| password: "", | |
| confirmPassword: "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define(['app'], function (app) { | |
| app.controller("mainCrl", function ($scope, $localStorage, $state) { | |
| var authData = $localStorage.authorizationData; | |
| console.log(authData) | |
| if(authData) { | |
| $scope.authentication = { | |
| isAuth: true, | |
| userName: authData.userName | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require.config({ | |
| paths: { | |
| 'angular': 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular.min', | |
| 'route': 'https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.16/angular-ui-router', | |
| 'mainCtrl': '/scripts/mainCtrl', | |
| 'loginCtrl': '/views/loginCtrl', | |
| 'homeCtrl': '/views/homeCtrl', | |
| 'signupCtrl': '/views/signupCtrl', | |
| 'orderCtrl': '/views/orderCtrl', | |
| 'authInterceptorService': '/scripts/services/authInterceptorService', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define(['route'], function () { | |
| var app = angular.module('app', ['ui.router', 'ngStorage']); | |
| app.init = function () { | |
| angular.bootstrap(document, ['app']); | |
| } | |
| app.config(function ($stateProvider, $urlRouterProvider) { | |
| $urlRouterProvider.otherwise("/home"); | |
| $stateProvider |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <connectionStrings> | |
| <add name="AuthContext" connectionString="Data Source=LENOVO\SQLEXPRESS; Initial Catalog=AngularJsAuth; Integrated Security=false; uid=sa; pwd=n@1;" providerName="System.Data.SqlClient"/> | |
| </connectionStrings> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using AngularJSAuthentication.API.Providers; | |
| using Microsoft.Owin; | |
| using Microsoft.Owin.Security.OAuth; | |
| using Owin; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Web.Http; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.AspNet.Identity.EntityFramework; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| namespace AngularJSAuthentication.API | |
| { | |
| public class AuthContext : IdentityDbContext<IdentityUser> | |
| { |