I am trying to load internal javascript in angular2. When i click on lable nothing happens. Here is my code.
<div class="login-page" style="margin-top:12%">
<div class="form" id="login">
<form class="register-form">
<h3 style="display:inline-block"><span class="glyphicon glyphicon-log-in" ></span></h3> <h1 style="display:inline-block">Sign Up</h1>
<input type="text" placeholder="first name"/>
<input type="text" placeholder="last name"/>
<input type="text" placeholder="email address"/>
<input type="password" placeholder="password"/>
<input type="text" placeholder="mobile"/>
<button>create</button>
<p class="message" (click)="clicked($event)">Already registered? <a href="#">Sign In</a></p>
</form>
<form class="login-form">
<h3 style="display:inline-block"><span class="glyphicon glyphicon-log-in" ></span></h3> <h1 style="display:inline-block">Login</h1>
<input type="text" placeholder="username"/>
<input type="password" placeholder="password"/>
<button>login</button>
<p class="message" (click)="clicked($event)">Not registered? <a href="#" class="message">Create an account</a></p>
</form>
</div>
</div>
import {Component} from '@angular/core';
@Component({
selector: 'home',
styleUrls: ['./home.css'],
templateUrl: './home.html'
})
export class Home {
clicked(event) {
$('form').animate({height: "toggle", opacity: "toggle"}, "slow");
}
}
Now, in console i am getting this error.
[default] /var/www/ap/angular2-seed-master/src/app/home/home.ts:10:3
Cannot find name '$'.
Is there any thing wrong. Please suggest me.