Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Angularv4ReactiveFormのやつ
import { Routes, RouterModule } from "@angular/router"
import { EmptyComponent } from "../empty/empty.component";
import { ReactiveFormOne } from "../reactive-forms/reactive-form-one.component";
import { InputPageCanDeactivatedGuard } from "./inputpage-can-deactivated-guard"
const routes: Routes = [
{ path: "empty", component: EmptyComponent },
{ path: "r1", component: ReactiveFormOne, canDeactivate: [InputPageCanDeactivatedGuard] },
{ path: "**", component: EmptyComponent }
]
export const appRouter = [
RouterModule.forRoot(routes)
];
export const activateGuardProvider = [
InputPageCanDeactivatedGuard
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment