diff --git a/src/app/components/components/steps/steps.component.html b/src/app/components/components/steps/steps.component.html
index f1ba04d30a..fbc260f867 100644
--- a/src/app/components/components/steps/steps.component.html
+++ b/src/app/components/components/steps/steps.component.html
@@ -15,23 +15,18 @@
{{horizontal ? 'Horizontal Mode' : 'Vertical Mode'}}
-
- Include any content you like for an active stepper
-
+ Basic Usage (template)
+ Include any content you like for an active stepper
-
- This step is required!
-
+ This step is required!
Toggle Require
Cancel
-
- Mark this step complete and get a summary
-
+ Mark this step complete and get a summary
Use an optional step summary to summarize the info in this step
@@ -135,9 +130,10 @@ Example:
-
- ... add content that will be shown when the step is "active"
+
+ ... add label content (if not used, falls back to [label] input)
+ ... add content that will be shown when the step is "active"
Close
... add button elements for the step content (optional)
diff --git a/src/app/components/layouts/card-over/card-over.component.html b/src/app/components/layouts/card-over/card-over.component.html
index 378d215862..6e510d1856 100644
--- a/src/app/components/layouts/card-over/card-over.component.html
+++ b/src/app/components/layouts/card-over/card-over.component.html
@@ -8,103 +8,95 @@
-
-
-
- ]]>
- The wrapper of your entire layout
-
-
-
- #layout
- The ID and local reference of your sidenav
-
-
-
- sidenavTitle?: string
- The title of your sidenav
-
-
-
- logo?: string
- The path to your sidenav logo
-
-
-
-
+
+
+ ]]>
+ The wrapper of your entire layout
+
+
+
+ #layout
+ The ID and local reference of your sidenav
+
+
+
+ sidenavTitle?: string
+ The title of your sidenav
+
+
+
+ logo?: string
+ The path to your sidenav logo
+
+
+
-
-
-
- ]]>
- The menu items wrapper
-
-
-
- ]]>
- Loops over the routes from your Class
-
-
-
- ]]>
- The SVG or font icon
-
-
-
-
+
+
+ ]]>
+ The menu items wrapper
+
+
+
+ ]]>
+ Loops over the routes from your Class
+
+
+
+ ]]>
+ The SVG or font icon
+
+
+
-
-
-
- ]]>
- Builds the top toolbar and content area
-
-
-
- toolbarTitle?: string
- The title of your toolbar
-
-
-
- logo?: string
- The path to your toolbar logo
-
-
-
-
+
+
+ ]]>
+ Builds the top toolbar and content area
+
+
+
+ toolbarTitle?: string
+ The title of your toolbar
+
+
+
+ logo?: string
+ The path to your toolbar logo
+
+
+
-
-
-
- ]]>
- Builds the card and content area
-
-
-
- cardTitle?: string
- The card title
-
-
-
- cardSubtitle?: string
- The card subtitle
-
-
-
- cardWidth?: number
- The card width percentage (default 70)
-
-
-
- ]]>
- Loads html for each route (view)
-
-
-
-
+
+
+ ]]>
+ Builds the card and content area
+
+
+
+ cardTitle?: string
+ The card title
+
+
+
+ cardSubtitle?: string
+ The card subtitle
+
+
+
+ cardWidth?: number
+ The card width percentage (default 70)
+
+
+
+ ]]>
+ Loads html for each route (view)
+
+
+
diff --git a/src/app/components/layouts/manage-list/manage-list.component.html b/src/app/components/layouts/manage-list/manage-list.component.html
index 8a6f162af8..7ed0841ebf 100644
--- a/src/app/components/layouts/manage-list/manage-list.component.html
+++ b/src/app/components/layouts/manage-list/manage-list.component.html
@@ -34,119 +34,109 @@
-
-
-
- ]]>
- The wrapper of your entire layout
-
-
-
- #layout
- The ID and local reference of your sidenav
-
-
-
- sidenavTitle?: string
- The title of your sidenav
-
-
-
- logo?: string
- The path to your sidenav logo
-
-
-
-
+
+
+ ]]>
+ The wrapper of your entire layout
+
+
+
+ #layout
+ The ID and local reference of your sidenav
+
+
+
+ sidenavTitle?: string
+ The title of your sidenav
+
+
+
+ logo?: string
+ The path to your sidenav logo
+
+
+
-
-
-
- ]]>
- The menu items wrapper
-
-
-
- ]]>
- Loops over the routes from your Class
-
-
-
- ]]>
- The SVG or font icon, depending on what you're using
-
-
-
-
+
+
+ ]]>
+ The menu items wrapper
+
+
+
+ ]]>
+ Loops over the routes from your Class
+
+
+
+ ]]>
+ The SVG or font icon, depending on what you're using
+
+
+
-
-
-
- ]]>
- Builds the top toolbar
-
-
-
- toolbarTitle?: string
- The title of your toolbar
-
-
-
- logo?: string
- The path to your toolbar logo
-
-
-
-
+
+
+ ]]>
+ Builds the top toolbar
+
+
+
+ toolbarTitle?: string
+ The title of your toolbar
+
+
+
+ logo?: string
+ The path to your toolbar logo
+
+
+
-
-
-
- ]]>
- Builds the left nav and content area
-
-
-
- ]]>
- The list items wrapper with optional dense
attribute
-
-
-
- ]]>
- Loads html for each route (view)
-
-
-
-
+
+
+ ]]>
+ Builds the left nav and content area
+
+
+
+ ]]>
+ The list items wrapper with optional dense
attribute
+
+
+
+ ]]>
+ Loads html for each route (view)
+
+
+
-
-
-
- ]]>
- The toolbar wrapper
-
-
-
- Title]]>
- Optional toolbar title
-
-
-
- ]]>
- Used as a spacer between buttons
-
-
-
- ]]>
- Toolbar icon buttons
-
-
-
-
+
+
+ ]]>
+ The toolbar wrapper
+
+
+
+ Title]]>
+ Optional toolbar title
+
+
+
+ ]]>
+ Used as a spacer between buttons
+
+
+
+ ]]>
+ Toolbar icon buttons
+
+
+
diff --git a/src/app/components/layouts/nav-list/nav-list.component.html b/src/app/components/layouts/nav-list/nav-list.component.html
index 718fcc06a5..723bf3db3a 100644
--- a/src/app/components/layouts/nav-list/nav-list.component.html
+++ b/src/app/components/layouts/nav-list/nav-list.component.html
@@ -22,92 +22,86 @@ {{item.title}}
-
-
-
- ]]>
- The wrapper of your entire layout
-
-
-
- #layout
- The ID and local reference of your sidenav
-
-
-
- sidenavTitle?: string
- The title of your sidenav
-
-
-
- logo?: string
- The path to your sidenav logo
-
-
-
-
+
+
+ ]]>
+ The wrapper of your entire layout
+
+
+
+ #layout
+ The ID and local reference of your sidenav
+
+
+
+ sidenavTitle?: string
+ The title of your sidenav
+
+
+
+ logo?: string
+ The path to your sidenav logo
+
+
+
-
-
-
- ]]>
- The menu items wrapper
-
-
-
- ]]>
- Loops over the routes from your Class
-
-
-
- ]]>
- The menu item icon
-
-
-
-
+
+
+ ]]>
+ The menu items wrapper
+
+
+
+ ]]>
+ Loops over the routes from your Class
+
+
+
+ ]]>
+ The menu item icon
+
+
+
-
-
-
- ]]>
- Builds the top toolbar, left nav and content area
-
-
-
- #list
- The ID and local reference of your list
-
-
-
- toolbarTitle?: string
- The title of your toolbar
-
-
-
- logo?: string
- The path to your toolbar logo
-
-
-
- ]]>
- The list items wrapper
-
-
-
- ]]>
- Right column page title (optional)
-
-
-
- ]]>
- Loads html for each route (view)
-
-
-
-
+
+
+ ]]>
+ Builds the top toolbar, left nav and content area
+
+
+
+ #list
+ The ID and local reference of your list
+
+
+
+ toolbarTitle?: string
+ The title of your toolbar
+
+
+
+ logo?: string
+ The path to your toolbar logo
+
+
+
+ ]]>
+ The list items wrapper
+
+
+
+ ]]>
+ Right column page title (optional)
+
+
+
+ ]]>
+ Loads html for each route (view)
+
+
+
diff --git a/src/app/components/layouts/nav-view/nav-view.component.html b/src/app/components/layouts/nav-view/nav-view.component.html
index cf823fb5e8..ced417846c 100644
--- a/src/app/components/layouts/nav-view/nav-view.component.html
+++ b/src/app/components/layouts/nav-view/nav-view.component.html
@@ -9,77 +9,71 @@
-
-
-
- ]]>
- The wrapper of your entire layout
-
-
-
- #layout
- The ID and local reference of your sidenav
-
-
-
- sidenavTitle?: string
- The title of your sidenav
-
-
-
- logo?: string
- The path to your sidenav logo
-
-
-
-
+
+
+ ]]>
+ The wrapper of your entire layout
+
+
+
+ #layout
+ The ID and local reference of your sidenav
+
+
+
+ sidenavTitle?: string
+ The title of your sidenav
+
+
+
+ logo?: string
+ The path to your sidenav logo
+
+
+
-
-
-
- ]]>
- The menu items wrapper (will be moved to sidenav automatically)
-
-
-
- ]]>
- Loops over the routes from your Class
-
-
-
- ]]>
- The SVG or font icon, depending on what you're using
-
-
-
-
+
+
+ ]]>
+ The menu items wrapper (will be moved to sidenav automatically)
+
+
+
+ ]]>
+ Loops over the routes from your Class
+
+
+
+ ]]>
+ The SVG or font icon, depending on what you're using
+
+
+
-
-
-
- ]]>
- Builds the top toolbar and content area
-
-
-
- toolbarTitle?: string
- The title of your toolbar
-
-
-
- logo?: string
- The path to your toolbar logo
-
-
-
- ]]>
- Loads html for each route (view)
-
-
-
-
+
+
+ ]]>
+ Builds the top toolbar and content area
+
+
+
+ toolbarTitle?: string
+ The title of your toolbar
+
+
+
+ logo?: string
+ The path to your toolbar logo
+
+
+
+ ]]>
+ Loads html for each route (view)
+
+
+
diff --git a/src/platform/core/index.ts b/src/platform/core/index.ts
index 298992d798..ed25f0dfd0 100644
--- a/src/platform/core/index.ts
+++ b/src/platform/core/index.ts
@@ -41,17 +41,17 @@ export { TdLayoutManageListComponent } from './layout/layout-manage-list/layout
import { TdStepsComponent } from './steps/steps.component';
import { TdStepHeaderComponent } from './steps/step-header/step-header.component';
import { TdStepBodyComponent } from './steps/step-body/step-body.component';
-import { TdStepComponent, TdStepActionsDirective, TdStepSummaryDirective,
- TdStepContentDirective } from './steps/step.component';
+import { TdStepComponent, TdStepLabelDirective, TdStepActionsDirective,
+ TdStepSummaryDirective } from './steps/step.component';
export const TD_STEP_DIRECTIVES: Type[] = [
TdStepsComponent,
TdStepComponent,
TdStepHeaderComponent,
TdStepBodyComponent,
+ TdStepLabelDirective,
TdStepActionsDirective,
TdStepSummaryDirective,
- TdStepContentDirective,
];
export { TdStepComponent, StepState } from './steps/step.component';
diff --git a/src/platform/core/steps/step-header/step-header.component.html b/src/platform/core/steps/step-header/step-header.component.html
index 9d9400616f..84dcfc6961 100644
--- a/src/platform/core/steps/step-header/step-header.component.html
+++ b/src/platform/core/steps/step-header/step-header.component.html
@@ -26,8 +26,12 @@
-
{{label}}
-
{{sublabel}}
+
+
+
+
+
+
mode_edit
diff --git a/src/platform/core/steps/step-header/step-header.component.ts b/src/platform/core/steps/step-header/step-header.component.ts
index 592667049b..91932562a4 100644
--- a/src/platform/core/steps/step-header/step-header.component.ts
+++ b/src/platform/core/steps/step-header/step-header.component.ts
@@ -14,16 +14,6 @@ export class TdStepHeaderComponent {
*/
@Input('number') number: number;
- /**
- * Label of [TdStepHeaderComponent].
- */
- @Input('label') label: string;
-
- /**
- * Sublabel of [TdStepHeaderComponent].
- */
- @Input('sublabel') sublabel: string;
-
/**
* active?: boolean
* Sets for active/inactive states on header.
diff --git a/src/platform/core/steps/step.component.html b/src/platform/core/steps/step.component.html
new file mode 100644
index 0000000000..1e7c8ee742
--- /dev/null
+++ b/src/platform/core/steps/step.component.html
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/src/platform/core/steps/step.component.ts b/src/platform/core/steps/step.component.ts
index bd517979b4..73a8df7252 100644
--- a/src/platform/core/steps/step.component.ts
+++ b/src/platform/core/steps/step.component.ts
@@ -1,7 +1,7 @@
-import { Component, Directive, Input, Output, TemplateRef,
- ViewContainerRef, ContentChild, AfterViewInit } from '@angular/core';
+import { Component, Directive, Input, Output, TemplateRef, ViewChild,
+ ViewContainerRef, ContentChild, AfterViewInit, OnInit } from '@angular/core';
import { EventEmitter } from '@angular/core';
-import { TemplatePortalDirective } from '@angular/material';
+import { TemplatePortalDirective, TemplatePortal } from '@angular/material';
export enum StepState {
None = 'none',
@@ -10,9 +10,9 @@ export enum StepState {
}
@Directive({
- selector: '[td-step-content]template',
+ selector: '[td-step-label]template',
})
-export class TdStepContentDirective extends TemplatePortalDirective {
+export class TdStepLabelDirective extends TemplatePortalDirective {
constructor(templateRef: TemplateRef, viewContainerRef: ViewContainerRef) {
super(templateRef, viewContainerRef);
}
@@ -38,16 +38,22 @@ export class TdStepSummaryDirective extends TemplatePortalDirective {
@Component({
selector: 'td-step',
- template: ' ',
+ templateUrl: 'step.component.html',
})
-export class TdStepComponent implements AfterViewInit {
+export class TdStepComponent implements OnInit, AfterViewInit {
private _number: number;
private _active: boolean = false;
private _state: StepState = StepState.None;
private _disabled: boolean = false;
- @ContentChild(TdStepContentDirective) stepContent: TdStepContentDirective;
+ private _contentPortal: TemplatePortal;
+ get stepContent(): TemplatePortal {
+ return this._contentPortal;
+ }
+
+ @ViewChild(TemplateRef) private _content: TemplateRef;
+ @ContentChild(TdStepLabelDirective) stepLabel: TdStepLabelDirective;
@ContentChild(TdStepActionsDirective) stepActions: TdStepActionsDirective;
@ContentChild(TdStepSummaryDirective) stepSummary: TdStepSummaryDirective;
@@ -140,6 +146,12 @@ export class TdStepComponent implements AfterViewInit {
*/
@Output('deactivated') onDeactivated: EventEmitter = new EventEmitter();
+ constructor(private _viewContainerRef: ViewContainerRef) {}
+
+ ngOnInit(): void {
+ this._contentPortal = new TemplatePortal(this._content, this._viewContainerRef);
+ }
+
ngAfterViewInit(): void {
if (this.number === undefined) {
throw 'The [td-step] component needs to have a [td-steps] parent component to work.';
diff --git a/src/platform/core/steps/steps.component.html b/src/platform/core/steps/steps.component.html
index 0f09c69f89..6d4576c928 100644
--- a/src/platform/core/steps/steps.component.html
+++ b/src/platform/core/steps/steps.component.html
@@ -2,12 +2,13 @@
+
+ {{step.label}}
+ {{step.sublabel | truncate:30}}
@@ -15,13 +16,14 @@
+
+ {{step.label}}
+ {{step.sublabel}}