JayChase / Angular.Net.SecureStarter

An AngularJS starter kit for ASP.NET which implements authentication and authorization with ASP.NET Identity 2.0.0.
MIT License
18 stars 7 forks source link

Decoupling #5

Closed SkyQuant closed 9 years ago

SkyQuant commented 9 years ago

Could you also add decoupled front-end variant in different project? I tried to extract start page and migrate JavaScript files but starting index.html page in root is blank.

<!DOCTYPE html>
<html ng-app="app" ng-strict-di>
<head>
    <link href="Content/bootstrap-theme.css" rel="stylesheet"/>
    <link href="Content/bootstrap-theme.min.css" rel="stylesheet"/>
    <link href="Content/bootstrap.css" rel="stylesheet"/>
    <link href="Content/bootstrap.min.css" rel="stylesheet"/>
    <link href="Content/pageTurnAnimation.css" rel="stylesheet"/>
    <link href="Content/Site.css" rel="stylesheet"/>
    <link href="Content/slideAnimation.css" rel="stylesheet"/>
    <link href="Content/toastr.css" rel="stylesheet"/>
    <link href="Content/toastr.min.css" rel="stylesheet"/>

    <script src="Scripts/jquery-2.1.1.min.js"></script>
    <script src="Scripts/jquery.utilities.js"></script>
    <script src="Scripts/jquery.validate.js"></script>

    <script src="Scripts/angular.min.js"></script>
    <script src="Scripts/angular-route.min.js"></script>
    <script src="Scripts/angular-resource.min.js"></script>
    <script src="Scripts/angular-animate.min.js"></script>
    <script src="Scripts/angular-cookies.min.js"></script>
    <script src="Scripts/angular-loader.min.js"></script>
    <script src="Scripts/angular-messages.min.js"></script>

    <script src="Scripts/bootstrap.min.js"></script>
    <script src="Scripts/respond.min.js"></script>
    <script src="Scripts/toastr.min.js"></script>

    <script src="app/app.js"></script>
    <script src="app/core/core.module.js"></script>
    <script src="app/core/appActivityService.js"></script>
    <script src="app/core/appStatusService.js"></script>
    <script src="app/core/navigationService.js"></script>
    <script src="app/core/notifierService.js"></script>
    <script src="app/core/skAppReady.js"></script>
    <script src="app/core/skDisableWhenBusy.js"></script>
    <script src="app/core/skFocusOnSetPristine.js"></script>
    <script src="app/core/storageService.js"></script>

    <script src="app/common/validation/skMatch.js"></script>
    <script src="app/common/validation/skAsyncValidators.js"></script>
    <script src="app/common/validation/skHasError.js"></script>
    <script src="app/common/validation/skUnique.js"></script>

    <script src="app/shell/shell.module.js"></script>
    <script src="app/shell/shellController.js"></script>
    <script src="app/shell/topNavController.js"></script>
    <script src="app/shell/skNavLinks.js"></script>
    <script src="app/shell/skNavLink.js"></script>
    <script src="app/shell/skBusyIndicator.js"></script>

    <script src="app/security/security.module.js"></script>
    <script src="app/security/accountResource.js"></script>
    <script src="app/security/signInController.js"></script>
    <script src="app/security/externalAuthService.js"></script>
    <script src="app/security/externalRegisterController.js"></script>
    <script src="app/security/externalSignInController.js"></script>
    <script src="app/security/guardService.js"></script>
    <script src="app/security/userService.js"></script>
    <script src="app/security/manageController.js"></script>
    <script src="app/security/registerController.js"></script>
    <script src="app/security/restoreUserService.js"></script>
    <script src="app/security/secureHttpInterceptor.js"></script>
    <script src="app/security/skChangePassword.js"></script>
    <script src="app/security/skCreateLocalLogin.js"></script>
    <script src="app/security/skLoginProvider.js"></script>
    <script src="app/security/skUserInfo.js"></script>
    <script src="app/security/skUserLogin.js"></script>
    <script src="app/security/usedLoginProviderFilter.js"></script>
    <script src="app/security/userManagementService.js"></script>

    <script src="app/content/content.module.js"></script>
    <script src="app/content/features/featuresController.js"></script>
    <script src="app/content/securedWebapiDemo/securedWebapiDemoController.js"></script>
    <script src="app/content/welcome/welcomeController.js"></script>

    <title data-ng-bind="title">Angular secure starter kit</title>
</head>
<body>
    <h3>hello world</h3>
    <div ng-include="'app/shell/shell.html'" class="container"></div>
</body>
</html>
JayChase commented 9 years ago

I'm looking at creating a splitting out the nuget packages and also creating a bower version.

SkyQuant commented 9 years ago

After splitting I still have troubles with server communication even after Cors setup through config.EnableCors(); and attributes. What the right steps to fix it?

SkyQuant commented 9 years ago

I change this snippet also:

    app.config(['$locationProvider', function ($locationProvider) {
        //$locationProvider.html5Mode().enabled = true;
        $locationProvider.html5Mode({
            enabled: true,
            requireBase: false
        });
    }]);