limitations under the License.
============LICENSE_END============================================
-->
-<input type="file" accept=".cba">
\ No newline at end of file
+<div>
+ <input type="file" accept=".json" (change)="fileChanged($event)">
+</div>
+<div>
+ <button mat-button matStepperNext class="matStepNextBtn" (click)="extractBlueprint()">Upload</button>
+</div>
\ No newline at end of file
See the License for the specific language governing permissions and
limitations under the License.
============LICENSE_END============================================
-*/
\ No newline at end of file
+*/
+
+.matStepNextBtn {
+ color: white;
+ background: gray;
+ margin-top: 10px;
+ position: absolute;
+ margin-bottom: 5px;
+}
\ No newline at end of file
============LICENSE_END============================================
*/
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, EventEmitter, Output } from '@angular/core';
+import { Store } from '@ngrx/store';
+import { IBlueprint} from '../../../../common/core/store/models/blueprint.model';
@Component({
selector: 'app-search-template',
styleUrls: ['./search-template.component.scss']
})
export class SearchTemplateComponent implements OnInit {
-
+ file: any;
+ localBluePrintData: IBlueprint;
+ fileText: object[];
+
constructor() { }
- ngOnInit() {
+ ngOnInit() { }
+
+ fileChanged(e: any) {
+ this.file = e.target.files[0];
+ let fileReader = new FileReader();
+ fileReader.readAsText(e.srcElement.files[0]);
+ var me = this;
+ fileReader.onload = function () {
+ let fileData = JSON.stringify(fileReader.result);
+ me.localBluePrintData = JSON.parse(fileData);
+ console.log(me.localBluePrintData);
+ }
+ }
+ extractBlueprint(){
}
-
}