import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
<% if (page.authorizedProfiles) { %>import { DeviceAuthGuard } from '@iotize/ionic/auth';<% } %>
import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.component';

const routes: Routes = [
    {
        path: '',
        component: <%= classify(name) %>Component,
        <% if (page.authorizedProfiles) { %>canActivate: [
          DeviceAuthGuard
        ],
        data: {
          username: <%= JSON.stringify(page.authorizedProfiles, null, 4) %>
        }
        <% } %>
    }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class <%= classify(name) %>RoutingModule { }
