linnovate/mean — pull request #882 by rmisiak (2014-11-14 02:55:36+00:00)
Title: Provide a way for custom packages to override views used by core and con...

This code will allow custom packages to override the views used by custom & contrib packages (such as the home page)

It creates a provider called $viewPathProvider. Routes are defined as so:

$stateProvider
.state('home', {
url: '/',
templateUrl: $viewPathProvider.path('system/views/index.html')
});

A custom package can then override the view used by doing this:

angular.module('mean.mycustompackage', [])
.config(['$viewPathProvider', function($viewPathProvider) {
$viewPathProvider.override('system/views/index.html', 'mycustompackage/views/homepage.html');
}]);