From 31d0c757d75a9d0f8f519f8edb936af503e92eeb Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 21 Jun 2016 02:48:23 +0100 Subject: [PATCH] chore(style-guide): remove routing styles Routing styles were breaking CI and are out of date, since we're using the 3.0.0 router. We should remove them until we have recommendations. --- .../app/+dashboard/dashboard.component.ts | 11 ----- .../ts/10-01/app/+dashboard/index.ts | 1 - .../ts/10-01/app/+heroes/heroes.component.ts | 11 ----- .../style-guide/ts/10-01/app/+heroes/index.ts | 2 - .../10-01/app/+heroes/shared/hero.service.ts | 8 ---- .../ts/10-01/app/+heroes/shared/index.ts | 1 - .../style-guide/ts/10-01/app/app.component.ts | 23 ---------- .../style-guide/ts/10-01/app/index.ts | 4 -- .../style-guide/ts/10-01/app/shared/index.ts | 1 - .../ts/10-01/app/shared/nav/index.ts | 1 - .../ts/10-01/app/shared/nav/nav.component.ts | 12 ------ public/docs/ts/latest/guide/style-guide.jade | 42 ------------------- 12 files changed, 117 deletions(-) delete mode 100644 public/docs/_examples/style-guide/ts/10-01/app/+dashboard/dashboard.component.ts delete mode 100644 public/docs/_examples/style-guide/ts/10-01/app/+dashboard/index.ts delete mode 100644 public/docs/_examples/style-guide/ts/10-01/app/+heroes/heroes.component.ts delete mode 100644 public/docs/_examples/style-guide/ts/10-01/app/+heroes/index.ts delete mode 100644 public/docs/_examples/style-guide/ts/10-01/app/+heroes/shared/hero.service.ts delete mode 100644 public/docs/_examples/style-guide/ts/10-01/app/+heroes/shared/index.ts delete mode 100644 public/docs/_examples/style-guide/ts/10-01/app/app.component.ts delete mode 100644 public/docs/_examples/style-guide/ts/10-01/app/index.ts delete mode 100644 public/docs/_examples/style-guide/ts/10-01/app/shared/index.ts delete mode 100644 public/docs/_examples/style-guide/ts/10-01/app/shared/nav/index.ts delete mode 100644 public/docs/_examples/style-guide/ts/10-01/app/shared/nav/nav.component.ts diff --git a/public/docs/_examples/style-guide/ts/10-01/app/+dashboard/dashboard.component.ts b/public/docs/_examples/style-guide/ts/10-01/app/+dashboard/dashboard.component.ts deleted file mode 100644 index 925b3c0365..0000000000 --- a/public/docs/_examples/style-guide/ts/10-01/app/+dashboard/dashboard.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'toh-dashboard', - templateUrl: 'app/dashboard/dashboard.component.html' -}) -export class DashboardComponent implements OnInit { - constructor() { } - - ngOnInit() { } -} diff --git a/public/docs/_examples/style-guide/ts/10-01/app/+dashboard/index.ts b/public/docs/_examples/style-guide/ts/10-01/app/+dashboard/index.ts deleted file mode 100644 index 28b2996161..0000000000 --- a/public/docs/_examples/style-guide/ts/10-01/app/+dashboard/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dashboard.component'; diff --git a/public/docs/_examples/style-guide/ts/10-01/app/+heroes/heroes.component.ts b/public/docs/_examples/style-guide/ts/10-01/app/+heroes/heroes.component.ts deleted file mode 100644 index 569a25f688..0000000000 --- a/public/docs/_examples/style-guide/ts/10-01/app/+heroes/heroes.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'toh-heroes', - templateUrl: 'app/heroes/heroes.component.html' -}) -export class HeroesComponent implements OnInit { - constructor() { } - - ngOnInit() { } -} diff --git a/public/docs/_examples/style-guide/ts/10-01/app/+heroes/index.ts b/public/docs/_examples/style-guide/ts/10-01/app/+heroes/index.ts deleted file mode 100644 index d85a0c81c4..0000000000 --- a/public/docs/_examples/style-guide/ts/10-01/app/+heroes/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './shared'; -export * from './heroes.component.ts'; diff --git a/public/docs/_examples/style-guide/ts/10-01/app/+heroes/shared/hero.service.ts b/public/docs/_examples/style-guide/ts/10-01/app/+heroes/shared/hero.service.ts deleted file mode 100644 index 6d9ec12949..0000000000 --- a/public/docs/_examples/style-guide/ts/10-01/app/+heroes/shared/hero.service.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable() -export class HeroService { - - constructor() { } - -} diff --git a/public/docs/_examples/style-guide/ts/10-01/app/+heroes/shared/index.ts b/public/docs/_examples/style-guide/ts/10-01/app/+heroes/shared/index.ts deleted file mode 100644 index 9edcfff7fb..0000000000 --- a/public/docs/_examples/style-guide/ts/10-01/app/+heroes/shared/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero.service'; diff --git a/public/docs/_examples/style-guide/ts/10-01/app/app.component.ts b/public/docs/_examples/style-guide/ts/10-01/app/app.component.ts deleted file mode 100644 index 38d27afd5d..0000000000 --- a/public/docs/_examples/style-guide/ts/10-01/app/app.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { Routes, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from '@angular/router'; - -import { NavComponent } from './shared'; -import { DashboardComponent } from './+dashboard'; -import { HeroesComponent, HeroService } from './+heroes'; - -@Component({ - selector: 'toh-app', - templateUrl: 'app/app.component.html', - styleUrls: ['app/app.component.css'], - directives: [ROUTER_DIRECTIVES, NavComponent], - providers: [ - ROUTER_PROVIDERS, - HeroService - ] -}) -@Routes([ - { path: '/dashboard', component: DashboardComponent }, // , useAsDefault: true}, // coming soon - { path: '/heroes/...', component: HeroesComponent }, -]) -export class AppComponent {} diff --git a/public/docs/_examples/style-guide/ts/10-01/app/index.ts b/public/docs/_examples/style-guide/ts/10-01/app/index.ts deleted file mode 100644 index 033b419bdc..0000000000 --- a/public/docs/_examples/style-guide/ts/10-01/app/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './+dashboard'; -export * from './+heroes'; -export * from './shared'; -export * from './app.component'; diff --git a/public/docs/_examples/style-guide/ts/10-01/app/shared/index.ts b/public/docs/_examples/style-guide/ts/10-01/app/shared/index.ts deleted file mode 100644 index 38d6745899..0000000000 --- a/public/docs/_examples/style-guide/ts/10-01/app/shared/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './nav'; diff --git a/public/docs/_examples/style-guide/ts/10-01/app/shared/nav/index.ts b/public/docs/_examples/style-guide/ts/10-01/app/shared/nav/index.ts deleted file mode 100644 index ca588a3642..0000000000 --- a/public/docs/_examples/style-guide/ts/10-01/app/shared/nav/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './nav.component'; diff --git a/public/docs/_examples/style-guide/ts/10-01/app/shared/nav/nav.component.ts b/public/docs/_examples/style-guide/ts/10-01/app/shared/nav/nav.component.ts deleted file mode 100644 index 79dc0b0710..0000000000 --- a/public/docs/_examples/style-guide/ts/10-01/app/shared/nav/nav.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'toh-nav', - templateUrl: 'app/shared/nav/nav.component.html' -}) -export class NavComponent implements OnInit { - constructor() { } - - ngOnInit() { } - -} diff --git a/public/docs/ts/latest/guide/style-guide.jade b/public/docs/ts/latest/guide/style-guide.jade index de1589c7fa..99689491e9 100644 --- a/public/docs/ts/latest/guide/style-guide.jade +++ b/public/docs/ts/latest/guide/style-guide.jade @@ -1850,48 +1850,6 @@ a(href="#toc") Back to top a(href="#toc") Back to top -.l-main-section -:marked - ## Routing - - Client-side routing is important for creating a navigation flow between a component tree hierarchy, and composing components that are made of many other child components. - -a(href="#toc") Back to top - -.l-main-section -:marked - ### Component Router - #### Style 10-01 - -.s-rule.do - :marked - **Do** separate route configuration into a routing component file, also known as a component router. - -.s-rule.do - :marked - **Do** use a `` in the component router, where the routes will have their component targets display their templates. - -.s-rule.do - :marked - **Do** focus the logic in the component router to the routing aspects and its target components. - -.s-rule.do - :marked - **Do** extract other logic to services and other components. - -.s-why - :marked - **Why?** A component that handles routing is known as the component router, thus this follows the Angular 2 routing pattern. - -.s-why.s-why-last - :marked - **Why?** The `` indicates where the template should be displayed for the target route. - -+makeExample('style-guide/ts/10-01/app/app.component.ts', '', 'app/app.component.ts') -:marked - -a(href="#toc") Back to top - .l-main-section :marked ## Appendix