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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | |
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> |
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
<div class="container"> | |
<div class="row"> | |
<div class="col-xs-12 mx-auto"> | |
<h1 class="display-4 text-center">Reactive Form Angular</h1> | |
<form [formGroup]="myForm" (ngSubmit)="onSubmit()"> | |
<div class="form-group"> | |
<label for="nama">Nama</label> | |
<input type="text" class="form-control" id="nama" formControlName="nama"> | |
<span class="text-danger" *ngIf="!myForm.get('nama').valid && myForm.get('nama').touched">Nama wajib diisi!</span> | |
</div> |
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, OnInit } from '@angular/core'; | |
import {FormControl, FormGroup, Validators} from '@angular/forms'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent implements OnInit{ | |
title = 'reactiveFormAngular'; | |
myForm: FormGroup; |
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
<div class="container"> | |
<div class="row"> | |
<div class="col-xs-12 mx-auto"> | |
<h1 class="display-4 text-center">Reactive Form Angular</h1> | |
<form> | |
<div class="form-group"> | |
<label for="nama">Nama</label> | |
<input type="text" class="form-control" id="nama"> | |
</div> |
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
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest |
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
package(default_visibility = ["//visibility:public"]) | |
load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web") | |
load("@npm//history-server:index.bzl", "history_server") | |
load("@npm//html-insert-assets:index.bzl", "html_insert_assets") | |
load("@npm_angular_bazel//:index.bzl", "ng_module") | |
load("@npm_bazel_karma//:index.bzl", "karma_web_test_suite") | |
load("@npm_bazel_rollup//:index.bzl", "rollup_bundle") | |
load("@npm_bazel_terser//:index.bzl", "terser_minified") | |
load("@npm_bazel_typescript//:index.bzl", "ts_devserver", "ts_library") |
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
{ | |
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | |
"version": 1, | |
"newProjectRoot": "projects", | |
"projects": { | |
"ngBazel": { | |
"projectType": "application", | |
"schematics": {}, | |
"root": "", | |
"sourceRoot": "src", |
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
// This is a backup file of the original angular.json. This file is needed in case you want to revert to the workflow without Bazel. | |
{ | |
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | |
"version": 1, | |
"newProjectRoot": "projects", | |
"projects": { | |
"ngBazel": { | |
"projectType": "application", | |
"schematics": {}, |
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
# Make TypeScript and Angular compilation fast, by keeping a few copies of the | |
# compiler running as daemons, and cache SourceFile AST's to reduce parse time. | |
build --strategy=TypeScriptCompile=worker | |
build --strategy=AngularTemplateCompile=worker | |
# Don't create bazel-* symlinks in the WORKSPACE directory, except `bazel-out`, | |
# which is mandatory. | |
# These require .gitignore and may scare users. | |
# Also, it's a workaround for https://github.com/bazelbuild/rules_typescript/issues/12 | |
# which affects the common case of having `tsconfig.json` in the WORKSPACE directory. |
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
# Make TypeScript and Angular compilation fast, by keeping a few copies of the | |
# compiler running as daemons, and cache SourceFile AST's to reduce parse time. | |
build --strategy=TypeScriptCompile=worker | |
build --strategy=AngularTemplateCompile=worker | |
# Don't create bazel-* symlinks in the WORKSPACE directory, except `bazel-out`, | |
# which is mandatory. | |
# These require .gitignore and may scare users. | |
# Also, it's a workaround for https://github.com/bazelbuild/rules_typescript/issues/12 | |
# which affects the common case of having `tsconfig.json` in the WORKSPACE directory. |
NewerOlder