Start a new topic

Angular 2

Angular 2 supports typescript now, So can duocode create the same metadata


like:


@Component({

  selector: 'my-component',

  template: '<div>Hello my name is {{name}}. <button (click)="sayMyName()">Say my name</button></div>'

})


maybe using attributes or something.


This following is a some basic angular 2... If DuoCode can support such

a thing... CAN SOMEONE PLEASE create a duocode equivalent class of the following.. so i know what the C# code looks like to handle the @Component and @View metedata  


<pre>


@Component({

  selector: 'my-component',

  template: '<div>Hello my name is {{name}}. <button (click)="sayMyName()">Say my name</button></div>'

})

export class MyComponent {

  constructor() {

    this.name = 'Max'

  }

  sayMyName() {

    console.log('My name is', this.name)

  }

}



</pre>

Login or Signup to post a comment