Tutorial Plugin
Angular2 Lazy Loaded Module
This is the root of the field app for the Tutorial plugin
Add File :file:`tutorial.component.ts`
``````````````````````````````````````
The :file:`tutorial.component.ts` is the Angular Component for the field app page.
It's loaded by the default route defined in :file:`tutorial.module.ts`.
.. note:: The one Angular component drives both the Capacitor and Web app views.
More on this later.
----
Create the file :file:`peek_plugin_tutorial/_private/field/tutorial.component.ts`
and populate it with the following contents.
::
import {Component} from "@angular/core";
@Component({
selector: 'plugin-tutorial',
templateUrl: 'tutorial.component.mweb.html',
moduleId: module.id
})
export class TutorialComponent {
constructor() {
}
}
Add File :file:`tutorial.module.ts`
```````````````````````````````````
The :file:`tutorial.module.ts` is the main Angular module of the plugin.
This file can describe other routes, that will load other components.
This is standard Angular.
`See NgModule for more