diff --git a/demo/src/app/components/progressbar/demos/progressbar-demo-bs3.component.html b/demo/src/app/components/progressbar/demos/progressbar-demo-bs3.component.html new file mode 100644 index 0000000000..043fd2d1d7 --- /dev/null +++ b/demo/src/app/components/progressbar/demos/progressbar-demo-bs3.component.html @@ -0,0 +1,82 @@ +
+

Static

+
+
+ +
+
+ 22% +
+
+ 166 / 200 +
+
+ +
+

Dynamic + +

+{{dynamic}} / {{max}} + + +No animation +{{dynamic}}% + +Object (changes type based on value) +{{type}} !!! + Watch out !!! + +
+

Stacked + +

+ + + {{baz?.value}}% + + +
+ +
+

In bootstrap 4 progress has a different concept, no inner text, no default transition animation

+

Static

+
+
+ +
+
+ 22% +
+
+ 166 / 200 +
+
+ +

Dynamic

+ + {{dynamic}} / {{max}} + + + No animation + {{dynamic}}% + + Object (changes type based on value) + + {{type}} !!! Watch out !!! + + +
+

Stacked

+
+ + + {{baz?.value}}% + + + +
+
diff --git a/demo/src/app/components/progressbar/demos/progressbar-demo.component.html b/demo/src/app/components/progressbar/demos/progressbar-demo.component.html index 8f912567b9..043fd2d1d7 100644 --- a/demo/src/app/components/progressbar/demos/progressbar-demo.component.html +++ b/demo/src/app/components/progressbar/demos/progressbar-demo.component.html @@ -1,3 +1,4 @@ +

Static

@@ -34,3 +35,48 @@

Stacked {{baz?.value}}% +

+ +
+

In bootstrap 4 progress has a different concept, no inner text, no default transition animation

+

Static

+
+
+ +
+
+ 22% +
+
+ 166 / 200 +
+
+ +

Dynamic

+ + {{dynamic}} / {{max}} + + + No animation + {{dynamic}}% + + Object (changes type based on value) + + {{type}} !!! Watch out !!! + + +
+

Stacked

+
+ + + {{baz?.value}}% + + + +
+
diff --git a/demo/src/app/components/progressbar/demos/progressbar-demo.component.ts b/demo/src/app/components/progressbar/demos/progressbar-demo.component.ts index 95381ce428..00ec1a0c6d 100644 --- a/demo/src/app/components/progressbar/demos/progressbar-demo.component.ts +++ b/demo/src/app/components/progressbar/demos/progressbar-demo.component.ts @@ -1,13 +1,10 @@ import { Component } from '@angular/core'; import { Ng2BootstrapConfig, Ng2BootstrapTheme } from 'ng2-bootstrap'; -const isBs3 = Ng2BootstrapConfig.theme === Ng2BootstrapTheme.BS3; -const templateUrl = isBs3 ? './progressbar-demo.component.html' : './progressbar-demo-bs4.component.html'; @Component({ selector: 'progressbar-demo', - // tslint:disable-next-line - templateUrl: templateUrl + templateUrl: './progressbar-demo.component.html' }) export class ProgressbarDemoComponent { public max: number = 200; @@ -15,6 +12,9 @@ export class ProgressbarDemoComponent { public dynamic: number; public type: string; public stacked: any[] = []; + public get isBs3(): boolean { + return Ng2BootstrapConfig.theme === Ng2BootstrapTheme.BS3; + } public constructor() { this.random(); diff --git a/demo/src/app/components/progressbar/progressbar-section.component.ts b/demo/src/app/components/progressbar/progressbar-section.component.ts index dab50da477..f8f0bb8f07 100644 --- a/demo/src/app/components/progressbar/progressbar-section.component.ts +++ b/demo/src/app/components/progressbar/progressbar-section.component.ts @@ -9,7 +9,7 @@ let titleDoc = require('html!markdown!./docs/title.md'); let ts = require('!!raw?lang=typescript!./demos/progressbar-demo.component.ts'); let templates:any = { - [Ng2BootstrapTheme.BS3]: require('!!raw?lang=markup!./demos/progressbar-demo.component.html'), + [Ng2BootstrapTheme.BS3]: require('!!raw?lang=markup!./demos/progressbar-demo-bs3.component.html'), [Ng2BootstrapTheme.BS4]: require('!!raw?lang=markup!./demos/progressbar-demo-bs4.component.html') }; diff --git a/demo/src/assets/css/prettify-angulario.css b/demo/src/assets/css/prettify-angulario.css index ce4d393583..77facd0443 100644 --- a/demo/src/assets/css/prettify-angulario.css +++ b/demo/src/assets/css/prettify-angulario.css @@ -36,7 +36,7 @@ font-size: 13px } -.prettyprint ol li { +.prettyprint ol li,.prettyprint .tag { color: #7a8b94; background: none; margin-bottom: 5px; diff --git a/package.json b/package.json index d4249aeaa1..bcc8bc7bcb 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "typedoc": "typedoc --exclude '**/*.spec.ts' ./src/", "demo.serve": "run-s build demo.build lite-server", "demo.gh-pages": "run-s build demo.build demo.deploy", - "demo.build": "ng build -p --aot && npm run generate-bs4", + "demo.build": "ng build -prod --aot && npm run generate-bs4", "demo.deploy": "gh-pages -d demo/dist", "link": "ngm link -p src && npm link ng2-bootstrap", "lint": "tslint \"**/*.ts\" -c tslint.json --fix --type-check -t prose -e \"node_modules/**\" -e \"dist/**\" -e \"temp/**\"",