Guidelines to implement ideal scalable angularJS application

Standard
Food for thought: Please go through code in VS, Its a sample angular application, doesn’t have that much of meat in it, a skeleton app which deals functionality like:
GitHub Repository:  GitHub Link
Directory Structure
Directory Structure
– File Naming Convention
File Naming Convention
– Angular UI routing
app.config(['$stateProvider', function ($stateProvider) {
        $stateProvider.state('allCandidates', {
            url: '/candidates',
            controller: 'CandidateController',
            controllerAs: 'vm',
            templateUrl: '/Scripts/app/modules/candidate/views/onBoardingApp.candidate.html'
        });
    }]);
– Angular UI Bootstrap 3 (Nothing that much has been done in terms of styling and look)
Bootstrap
Dependency Injection for each module (onBoardingApp.candidate.js file)
   var app = angular.module('onBoardingApp.candidate', [
            'onBoardingApp.candidate.services',
            'onBoardingApp.candidate.controllers'
        ]);
Routing for each module (onBoardingApp.candidate.js file)
app.config(['$stateProvider', function ($stateProvider) {
        $stateProvider.state('adminHome', {
            url: '/',
            controller: 'HomeController',
            controllerAs: 'vm',
            templateUrl: '/Scripts/app/modules/home/views/onBoardingApp.home.html'
        });
    }]);
– For scalability using Controller AS feature for $scope replacement (Please check onBoardingApp.candidate.controller.js and onBoardingApp.candidate file)
– Sample test factory (onBoardingApp.candidate.services.js file)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s