|
1 | | -import { Component, Input, OnInit, OnDestroy } from "@angular/core"; |
| 1 | +import { Component, Input } from "@angular/core"; |
2 | 2 | import { ApiDefinition } from "../../../components/api/api.component"; |
3 | 3 | import { SuiPopupConfig } from "ng2-semantic-ui"; |
4 | 4 |
|
@@ -173,33 +173,22 @@ export class MyComponent { |
173 | 173 |
|
174 | 174 | @Component({ |
175 | 175 | selector: "example-popup-standard", |
176 | | - template: exampleStandardTemplate |
| 176 | + template: exampleStandardTemplate, |
| 177 | + providers: [SuiPopupConfig] |
177 | 178 | }) |
178 | | -export class PopupExampleStandard implements OnInit { |
179 | | - // We only need to do this once. |
180 | | - private _config:SuiPopupConfig; |
181 | | - |
182 | | - constructor(public popupConfig:SuiPopupConfig) { |
183 | | - this._config = new SuiPopupConfig(); |
184 | | - |
185 | | - Object.assign(this._config, popupConfig); |
186 | | - Object.assign(this.popupConfig, new SuiPopupConfig()); |
187 | | - } |
188 | | - |
189 | | - public ngOnInit():void { |
190 | | - Object.assign(this.popupConfig, this._config); |
191 | | - } |
192 | | -} |
| 179 | +export class PopupExampleStandard {} |
193 | 180 |
|
194 | 181 | @Component({ |
195 | 182 | selector: "example-popup-template", |
196 | | - template: exampleTemplateTemplate |
| 183 | + template: exampleTemplateTemplate, |
| 184 | + providers: [SuiPopupConfig] |
197 | 185 | }) |
198 | 186 | export class PopupExampleTemplate {} |
199 | 187 |
|
200 | 188 | @Component({ |
201 | 189 | selector: "example-popup-placement", |
202 | | - template: examplePlacementTemplate |
| 190 | + template: examplePlacementTemplate, |
| 191 | + providers: [SuiPopupConfig] |
203 | 192 | }) |
204 | 193 | export class PopupExamplePlacement { |
205 | 194 | @Input() |
|
0 commit comments