My patientdetails.component.html code as follows
<div class="input-group" *ngIf="Patient">
{{Patient.remarks}}
Click here
Patient.component.ts code as follows
import { Component, OnInit ,Input} from '@angular/core';
import {Patient} from '../patient.model'
import { UpperCasePipe,LowerCasePipe,TitleCasePipe } from '@angular/common';
@Component({
selector: 'app-patientinfodetails',
templateUrl: './patientinfodetails.component.html',
styleUrls: ['./patientinfodetails.component.css']
})
export class PatientinfodetailsComponent implements OnInit {
@Input() Patient: Patient;
constructor() { }
ngOnInit() {
var app = app.module('SAMPLEAPP', []);
app.controller('heroes', function($scope, $window) {
$scope.foo = function() {
$window.open('//google.com');
};
});
}
}
In run mode browser has follows
Rajesh - 356254
Both eyes are good clickhere (Button)
When i click the clickhere button i want to open a new tab.
for that i written the above code
But when i click the clickhere button it is not opening into new tab
What I have tried:
My patientdetails.component.html code as follows
<div class="input-group" *ngIf="Patient">
<div>
<div> <a href="#" class="headinofbody">{{Patient.first_name | titlecase }} - {{Patient.mrd_no}}</a><br/>
</div>
<div class="sjexpand text-justify">
<p id="sjddd" class="st text">
{{Patient.remarks}}
<button type="button" class="btn btn-primary-outline pull-middle" (click)="btnClick();">Click here</button>
</p>
</div>
</div>
Patient.component.ts code as follows
import { Component, OnInit ,Input} from '@angular/core';
import {Patient} from '../patient.model'
import { UpperCasePipe,LowerCasePipe,TitleCasePipe } from '@angular/common';
@Component({
selector: 'app-patientinfodetails',
templateUrl: './patientinfodetails.component.html',
styleUrls: ['./patientinfodetails.component.css']
})
export class PatientinfodetailsComponent implements OnInit {
@Input() Patient: Patient;
constructor() { }
ngOnInit() {
var app = app.module('SAMPLEAPP', []);
app.controller('heroes', function($scope, $window) {
$scope.foo = function() {
$window.open('//google.com');
};
});
}
}
In run mode browser has follows
Rajesh - 356254
Both eyes are good clickhere (Button)
When i click the clickhere button i want to open a new tab.
for that i written the above code
But when i click the clickhere button it is not opening into new tab