Last active
March 12, 2018 22:53
-
-
Save juliosguz/ccc47c4a75b80db08c40a40aab5521ae to your computer and use it in GitHub Desktop.
NativeScript Angular snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from "@angular/core"; | |
import { Routes } from "@angular/router"; | |
import { NativeScriptRouterModule } from "nativescript-angular/router"; | |
const routes: Routes = []; | |
@NgModule({ | |
imports: [NativeScriptRouterModule.forChild(routes)], | |
exports: [NativeScriptRouterModule] | |
}) | |
export class GenericRoutingModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from "@angular/core"; | |
@Component({ | |
selector: "Generic", | |
moduleId: module.id, | |
templateUrl: "./generic.component.html", | |
styleUrls: ["./generic.component.scss"] | |
}) | |
export class GenericComponent implements OnInit { | |
constructor() { } | |
ngOnInit(): void { } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; | |
import { NativeScriptCommonModule } from "nativescript-angular/common"; | |
@NgModule({ | |
imports: [ | |
NativeScriptCommonModule | |
], | |
declarations: [], | |
entryComponents: [], | |
providers: [], | |
schemas: [ | |
NO_ERRORS_SCHEMA | |
] | |
}) | |
export class GenericModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from "@angular/core"; | |
@Injectable() | |
export class GenericService { | |
constructor() { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment