Write me an example of a component in Angular JS?
system
Write me an example of a component in Angular JS?
user
Below is a basic example of a component in Angular JS.

import { Component } from '@angular/core';

@Component ({
   selector: 'my-app',
   template: ` <div>
      <h1>{{title}}</h1>
      <div>Learn Angular6 with examples</div>
   </div> `,
})

export class AppComponent {
   title: string = 'Welcome to Angular world';
}
assistant
<|system|>
</s>
<|user|>
Write me an example of a component in Angular JS?</s>
<|assistant|>
Below is a basic example of a component in Angular JS.

import { Component } from '@angular/core';

@Component ({
   selector: 'my-app',
   template: ` <div>
      <h1>{{title}}</h1>
      <div>Learn Angular6 with examples</div>
   </div> `,
})

export class AppComponent {
   title: string = 'Welcome to Angular world';
}</s>
