basic of angular typescript

The solution for “basic of angular typescript” can be found here. The following code will assist you in solving the problem.

import { Component } from ‘@angular/core’;

@Component({
selector: ‘app-root’,
templateUrl: ‘./app.component.html’,
styleUrls: [‘./app.component.css’],
})
export class AppComponent {
title = ‘first’;
//function in class:
getname() {
return this.title;
}
//object:
obj = {
fname: ‘hey’,
lname: ‘there!’,
};
//array:
arr = [‘php’, ‘java’, ‘.net’];
a=12;
b=4;
Url=window.location.href
}

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in