@thinkeloquent/es6-router

0.0.11 • Public • Published

es6-router

Installation

npm install
npm package ()

Usage

Route Component Definition

'use strict';

import main_module from '@thinkeloquent/es6-router';

const app = angular.module('app', ['ngComponentRouter']);

app.component('app', {
  template: `<ng-outlet></ng-outlet>`,
  $routeConfig: [
    {
      path: '/',
      name: 'Home',
      component: 'home',
      useAsDefault: true
    },
    {
      path: '/about',
      name: 'About',
      component: 'about'
    }
  ]
});

app.component('home', {
  template: '<h2>Home Page</h2>',
})

app.component('about', {
  template: '<h2>About Page</h2>',
})

main_module.angular['1.6.x'].router.register(app);

Examples

Resources

Readme

Keywords

none

Package Sidebar

Install

npm i @thinkeloquent/es6-router

Weekly Downloads

2

Version

0.0.11

License

MIT

Last publish

Collaborators

  • thinkeloquent