Skip to content

Installation guide for ng route

Błażej Krysiak edited this page May 18, 2016 · 6 revisions

Before start

Make sure you are familiar with:

Overview

  1. Including dependencies in module

Including dependencies in module

In order to angular-permission cooperate with your router you should include two modules permission and permission.ng to your module:

angular.module('yourModule', [
  ...
  'ngRoute', 'permission', 'permission.ng', 
  ...
]);

When using modular import support (Webpack/Browserify/Rollup/CommonJS), angular-permission exports modules permission,uiPermission and ngPermission that can be imported directly in your code:

import angular from 'angular';
import ngRoute from 'angular-route';
import {permission, ngPermission} from 'angular-permission';

angular.module('app', [ngRoute, permission, ngPermission]);

...

Next to read: 👉 Usage in routes