This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { IProduct } from './product'; | |
| import { Http, Response } from '@angular/http'; | |
| import { Observable } from 'rxjs/Observable'; | |
| @Injectable() | |
| export class MyServiceService { | |
| private productUrl = '/app/products.json'; | |
| constructor(private http: Http) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { bootstrap } from '@angular/platform-browser-dynamic'; | |
| import { enableProdMode, provide } from '@angular/core'; | |
| import { T3AppComponent, environment } from './app/'; | |
| import { MyServiceService } from './app/my-service.service'; | |
| import { LOOKUP_LISTS, lookupLists } from './app/providers'; | |
| if (environment.production) { | |
| enableProdMode(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { bootstrap } from '@angular/platform-browser-dynamic'; | |
| import { enableProdMode, provide } from '@angular/core'; | |
| import { T3AppComponent, environment } from './app/'; | |
| import { MyServiceService } from './app/my-service.service'; | |
| var lookupLists = { | |
| mediums: ['Movies', 'Series'] | |
| } | |
| if (environment.production) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| @Injectable() | |
| export class MyServiceService { | |
| constructor() {} | |
| get(){ | |
| return this.mediaItems; | |
| } | |
| add(mediaItem){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component } from '@angular/core'; | |
| import { Control, Validators, FormBuilder } from '@angular/common'; | |
| @Component({ | |
| moduleId: module.id, | |
| selector: 't3-app', | |
| templateUrl: 't3.component.html', | |
| styleUrls: ['t3.component.css'] | |
| }) | |
| export class T3AppComponent { | |
| form; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1> | |
| {{title | json}} | |
| </h1> | |
| <form (ngSubmit)="onSubmit(form.value)" [ngFormModel]="form"> | |
| <ul> | |
| <li> | |
| <label for="medium">Medium2</label> | |
| <select name="medium" id="medium" ngControl="medium"> | |
| <option value="Movies">Movies</option> | |
| <option value="Series">Series</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1> | |
| {{title | json}} | |
| </h1> | |
| <form (ngSubmit)="onSubmit(form.value)" [ngFormModel]="form"> | |
| <ul> | |
| <li> | |
| <label for="medium">Medium2</label> | |
| <select name="medium" id="medium" ngControl="medium"> | |
| <option value="Movies">Movies</option> | |
| <option value="Series">Series</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1> | |
| {{title | json}} | |
| </h1> | |
| <form (ngSubmit)="onSubmit(form.value)" [ngFormModel]="form"> | |
| <ul> | |
| <li> | |
| <label for="medium">Medium2</label> | |
| <select name="medium" id="medium" ngControl="medium"> | |
| <option value="Movies">Movies</option> | |
| <option value="Series">Series</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1> | |
| {{title | json}} | |
| </h1> | |
| <form (ngSubmit)="onSubmit(form.value)" [ngFormModel]="form"> | |
| <ul> | |
| <li> | |
| <label for="medium">Medium2</label> | |
| <select name="medium" id="medium" ngControl="medium"> | |
| <option value="Movies">Movies</option> | |
| <option value="Series">Series</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1> | |
| {{title | json}} | |
| </h1> | |
| <form (ngSubmit)="onSubmit(myform.value)" #myform="ngForm"> | |
| <ul> | |
| <li> | |
| <label for="medium">Medium2</label> | |
| <select name="medium" id="medium" ngControl="medium"> | |
| <option value="Movies">Movies</option> | |
| <option value="Series">Series</option> |