refactor(router): renames PRIMARY_OUTLET into primary

This commit is contained in:
vsavkin
2016-07-22 13:25:48 -07:00
parent 41178367d1
commit 93a4ca652a
5 changed files with 22 additions and 7 deletions

View File

@ -88,11 +88,10 @@ function normalizeCommands(commands: any[]): NormalizedNavigationCommands {
if (typeof c === 'object' && c.outlets !== undefined) {
const r: {[k: string]: any} = {};
forEach(c.outlets, (commands: any, name: string) => {
const n = name === '' ? PRIMARY_OUTLET : name;
if (typeof commands === 'string') {
r[n] = commands.split('/');
r[name] = commands.split('/');
} else {
r[n] = commands;
r[name] = commands;
}
});
res.push({outlets: r});