Skip to content

Instantly share code, notes, and snippets.

@juliosguz
Last active March 12, 2018 22:53
Show Gist options
  • Save juliosguz/ccc47c4a75b80db08c40a40aab5521ae to your computer and use it in GitHub Desktop.
Save juliosguz/ccc47c4a75b80db08c40a40aab5521ae to your computer and use it in GitHub Desktop.
NativeScript Angular snippets
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 { }
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 { }
}
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 { }
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