Tutorial by Examples: angular2

To use jquery in your Angular 2.x components, declare a global variable on the top If using $ for jQuery declare var $: any; If using jQuery for jQuery declare var jQuery: any This will allow using $ or jQuery into your Angular 2.x component.
Steps: Create Empty .Net Core Web App: Go to wwwroot, and create a normal html page called Index.html: Configure Startup.cs to accept static files (this will require to add "Microsoft.AspNetCore.StaticFiles": "1.0.0" library in the “project.json” file): ...
A SIMPLE TEMPLATE Let’s start with a very simple template that shows our name and our favorite thing: <div> Hello my name is {{name}} and I like {{thing}} quite a lot. </div> {}: RENDERING To render a value, we can use the standard double-curly syntax: My name is {{name}} P...
Startup.cs using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.E...
Download seed Run dotnet restore Run npm install Always. Enjoy. https://github.com/SamML/CoreAngular000
How to: CALL ANGULAR 2 HTML/JS COMPONENT FROM ASP.NET Core CONTROLLER: We call the HTML instead return View() return File("~/html/About.html", "text/html"); And load angular component in the html. Here we can decide if we want to work with same or diferent module. Depends o...
webpack.config.js const webpack = require("webpack") const helpers = require('./helpers') const path = require("path") const WebpackNotifierPlugin = require('webpack-notifier'); module.exports = { // set entry point for your app module "entry": { ...
We can create dynamic component and get the instances of component into an array and finally rendered it on template. For example, we can can consider two widget component, ChartWidget and PatientWidget which extended the class WidgetComponent that I wanted to add in the container. ChartWidget.ts ...
Angular 2 wrapper library for Dropzone. npm install angular2-dropzone-wrapper --save-dev Load the module for your app-module import { DropzoneModule } from 'angular2-dropzone-wrapper'; import { DropzoneConfigInterface } from 'angular2-dropzone-wrapper'; const DROPZONE_CONFIG: DropzoneCon...
When generating new Angular 2 components in a .NET Core project, you may run into the following errors (as of version 0.8.3): Error locating module for declaration SilentError: No module files found OR No app module found. Please add your new Class to your component. Identica...
This is an Angular 2 wrapper library for Dropzone. npm install angular2-dropzone-wrapper --save-dev Load the module for your app import { DropzoneModule } from 'angular2-dropzone-wrapper'; import { DropzoneConfigInterface } from 'angular2-dropzone-wrapper'; const DROPZONE_CONFIG: Dropzon...

Page 2 of 2