-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathdemo.js
32 lines (30 loc) · 978 Bytes
/
demo.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'use strict';
angular.module('angularWidgetApp', ['ngRoute', 'angularWidget'])
// .config(function setHtml5Mode($locationProvider) {
// $locationProvider.html5Mode(true);
// })
.config(function initializeRouteProvider($routeProvider) {
['app1', 'app2', 'app3'].forEach(function (applicationName) {
$routeProvider.when('/' + applicationName + '/:eatall*?', {
template: '<ng-widget src="\'' + applicationName + '\'" delay="0"></ng-widget>',
reloadOnSearch: false
});
});
$routeProvider.otherwise({
redirectTo: '/app1/'
});
})
.config(function initializemanifestGenerator(widgetsProvider) {
widgetsProvider.setManifestGenerator(function () {
return function (name) {
return {
module: name,
html: 'views/' + name + '.html',
files: [
'scripts/controllers/' + name + '.js',
'styles/' + name + '.css'
]
};
};
});
});