4.3.1 • Published 1 day ago

@ovh-ux/ng-ui-router-layout v4.3.1

Weekly downloads
27
License
BSD-3-Clause
Repository
github
Last release
1 day ago

ng-ui-router-layout

Enhance UI-Router by adding a layout decorator.

npm version Downloads Dependencies Dev Dependencies

Install

$ yarn add @ovh-ux/ng-ui-router-layout

Usage

modal layout

This layout is now deprecated. Prefer using ouiModal layout.

// index.js
import angular from 'angular';
import ngUiRouterLayout from '@ovh-ux/ng-ui-router-layout';

angular.module('myApp', [ngUiRouterLayout]);

With controller and template

// routing.js
import controller from './controller';
import template from './template.html';

$stateProvider.state('state.name', {
  url,
  views: {
    modal: {
      controller,
      template,
    },
  },
  layout: 'modal',
});

With component

// routing.js
$stateProvider.state('state.name', {
  url,
  views: {
    modal: {
      component: 'awesomeModal',
    },
  },
  layout: 'modal',
});

With a component provider

// routing.js
$stateProvider.state('state.name', {
  url,
  views: {
    modal: {
      componentProvider: (predicate) =>
        predicate
          ? 'awesomeModalForTruePredicate'
          : 'awesomeModalForFalsePredicate',
    },
  },
  layout: 'modal',
});

ouiModal layout

See ouiModal layout.

Test

$ yarn test

Related

Contributing

Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, our contributing guide will help get you started.

License

BSD-3-Clause © OVH SAS

4.3.1

1 day ago

4.3.0

3 months ago

4.2.1

5 months ago

4.1.4

8 months ago

4.1.3

10 months ago

4.2.0

6 months ago

4.1.2

1 year ago

4.1.1

1 year ago

4.1.0

2 years ago

4.0.6

2 years ago

4.0.5

2 years ago

4.0.4

3 years ago

4.0.3

3 years ago

4.0.2

3 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.3.3

4 years ago

3.3.2

4 years ago

3.3.1

4 years ago

3.3.0

4 years ago

3.2.0

4 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago