0.5.10 • Published 7 years ago

ng2-app-scaffold v0.5.10

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

npm version ng2-app-scaffold Code Climate All Contributors

Overview

Angular2 scaffold that provides a set of components to create a repsonsive, modern application shell, including top nav with bread crumb, notifications, user info; current nav and footer. The components are service driven, so information can be fully customized by providing service overloads. In the preferred usage scenario, users would simple use the app component in the root application component and then use the router to manage the application content. This frees up developers on focusing on the actual app components.

Install

Install via npm:

    npm install --save ng2-app-scaffold

Use

Import AppScaffoldModule and AppComponent in your main app module (usually app.module.ts). Note that the scaffold comes with a predefined AppComponent for bootstrapping, there is not need to create a AppComponent in your ng2 project. That is the whole point.

    import { AppComponent, AppScaffoldModule } from 'ng2-app-scaffold'

Add the AppComponent as the bootstrap for your ng2 module and import the AppScaffoldModule (note: the module must be listed prior to the route configuration. Inject any concrete implementations for providers to configure navigation, profile service, breadcrumb service, etc.

    @NgModule({
        bootstrap: [ AppComponent ],
        declarations: [
            ...
        ],
        imports: [
            UniversalModule,
            AppScaffoldModule.forRoot(),
            RouterModule.forRoot([
                ...
            ])
        ],
        providers: [
            {
                provide: CurrentNavProvider, deps: [...], useFactory: NavProviderFactory
            },
            {
                provide: ConfigService, deps: [], useFactory: ConfigProviderFactory
            }
        ]
    })

    export function NavProviderFactory(...){
        return new CurrentNavService(...); 
            // this is your implementation of the current navigation provider.  
    }

    export function ConfigProviderFactory(){
        return new AppConfigService(); 
                  // this is your implementation of the configuration service. 
    }

Note: The provider factory was moved into an exported method to accomodate Angular 4 requirements to no have lambda functions in the provider loading.

#Advanced Check out the Wiki for detailed documentation on components, models and providers.

0.5.10

7 years ago

0.5.9

7 years ago

0.5.8

7 years ago

0.5.7

7 years ago

0.5.6

7 years ago

0.5.5

7 years ago

0.5.4

7 years ago

0.5.3

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.15

7 years ago

0.4.14

7 years ago

0.4.13

7 years ago

0.4.12

7 years ago

0.4.11

7 years ago

0.4.10

7 years ago

0.4.9

7 years ago

0.4.8

7 years ago

0.4.7

7 years ago

0.4.6

7 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.18

7 years ago

0.2.17

7 years ago

0.2.16

7 years ago

0.2.15

7 years ago

0.2.14

7 years ago

0.2.13

7 years ago

0.2.12

7 years ago

0.2.11

7 years ago

0.2.10

7 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.21

7 years ago

0.1.20

7 years ago

0.1.19

7 years ago

0.1.18

7 years ago

0.1.17

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago