This file contains 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"> | |
<form #myForm="ngForm" (ngSubmit)="submitForm()"> | |
<div class="row"> | |
<div class="col-md-4 col-md-offset-4"> | |
<h1>Form Validations</h1> | |
</div> | |
</div> |
This file contains 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
{ | |
"compilerOptions": { | |
"target": "es5", | |
"module": "es2015", | |
"moduleResolution": "node", | |
"sourceMap": true, | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"lib": ["es2015", "dom"], | |
"noImplicitAny": true, |
This file contains 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
/// <reference path="../node_modules/@types/node/index.d.ts" /> | |
import { platformBrowser } from '@angular/platform-browser'; | |
import { AppModuleNgFactory } from '../dist/aot/app/app.module.ngfactory'; | |
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory); |
This file contains 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 rollup from 'rollup' | |
import nodeResolve from 'rollup-plugin-node-resolve' | |
import commonjs from 'rollup-plugin-commonjs'; | |
export default { | |
entry: './dist/app/boot-aot.js', | |
dest: './dist/temp/prod/app/bundle.js', // output a single application bundle | |
sourceMap: false, | |
format: 'iife', | |
onwarn: function(warning) { |
This file contains 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 rollup from 'rollup' | |
import nodeResolve from 'rollup-plugin-node-resolve' | |
import commonjs from 'rollup-plugin-commonjs'; | |
import uglify from 'rollup-plugin-uglify'; | |
export default { | |
entry: './dist/app/boot-aot.js', | |
dest: './dist/temp/prod/app/bundle.js', // output a single application bundle | |
sourceMap: false, |
This file contains 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 rollup from 'rollup' | |
import nodeResolve from 'rollup-plugin-node-resolve' | |
import commonjs from 'rollup-plugin-commonjs'; | |
import uglify from 'rollup-plugin-uglify'; | |
export default { | |
entry: './dist/app/boot-aot.js', | |
dest: './dist/temp/prod/app/bundle.min.js', // output a single application bundle | |
sourceMap: false, | |
format: 'iife', |
This file contains 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
var gulp = require('gulp'); //Add dependency to package.json if not added | |
var replace = require('gulp-replace'); //Add dependency to package.json if not added | |
gulp.task('tweak-minJs', function () { | |
gulp.src(['dist/temp/prod/app/bundle.min.js']) | |
.pipe(replace('moduleId:module.id,', '')) | |
.pipe(gulp.dest('dist/prod/src/app')); | |
}); |
This file contains 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
var uglifycss = require('gulp-uglifycss'); //Add dependency to package.json if not added | |
gulp.task('vendor-css', function () { | |
gulp.src(['./assets/css/*.css', './assets/css/**/*.css']) //All css files | |
.pipe(uglifycss({ | |
'maxLineLen': 80, | |
'uglyComments': true | |
})) | |
.pipe(concat('vendor.css')) | |
.pipe(gulp.dest('dist/prod/src/assets/css/')); |
This file contains 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
var concat = require('gulp-concat'); //Add dependency to package.json if not added | |
gulp.task('vendor-js', function () { | |
gulp.src(["assets/js/sweetalert2.min.js","assets/js/jquery-ui.min.js'" ... ]) // Add all js files path | |
.pipe(concat('vendor.js')) //Concatenate to a single js file | |
.pipe(gulp.dest('dist/prod/src/assets/js/')); // destination folder | |
}); |
This file contains 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
gulp.task('vendor-top-js', function () { | |
gulp.src(["assets/js/sweetalert2.min.js","assets/js/jquery-ui.min.js", ... ]) // Add all js files path | |
.pipe(gulp.dest('dist/prod/src/assets/js/')); // destination folder | |
}); |
OlderNewer