Skip to content

Instantly share code, notes, and snippets.

@Takas0522
Created June 14, 2017 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Takas0522/9cf77df7133f3348439018f8ef64952a to your computer and use it in GitHub Desktop.
Save Takas0522/9cf77df7133f3348439018f8ef64952a to your computer and use it in GitHub Desktop.
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