Angular2 Bootstrap DatePicker Tutorial

  • Modify this file for moduleResolution, for intellisense and decorator metadata as shown in following code:

    Step 4: In the project, add a new file of the name systemjs.config.js.

  • This file contains the Person class as shown in the following code:

    Step 6: In the app folder, add a new file of the name app.component.ts with the following code:

    The above code contains Angular 2 component of the name AppComponent.

  • This file will contain bootstrap code for the Angular 2 project as shown in the following code:

    This step imports all the required modules for the application to run e.g. DatepickerModule, FormsModule, etc.

  • To run the application, execute the following command from the command prompt

    This command will start the server on 8080 port as shown in the following image:

    Open the browser and enter the following URL in the address bar:

    You should see the following result:

    The datepicker shows the current month because its onlyCurrentMonth property is set.

  • Download the entire source code for the Angular 2 Datepicker Demo

    Conclusion: The Angular 2 bootstrap DatePicker component is a cool UI element for calendar operations based on dates.

This Angular 2 DatePicker tutorial shows how to use the DatePicker UI element from the Angular 2 bootstrap project.
Continue reading “Angular2 Bootstrap DatePicker Tutorial”

Why Vue 2 beats Angular 2 and React – Jon Paul Miles – Medium

  • At first it was going to be Angular 2 vs React, but then a friend mentioned that people who used Vue wished they had known about it sooner and preferred it over React.I built a small dynamic single page in a single app in Vue 2, Angular, and React and I measured things like learning time, difficulty, and boilerplate.
  • The boiler plate was less than Angular 2 and less than React.
  • Vue also had directives which allowed my users to maintain their theme api.Vue is more like Angular 1 than Angular 2 is (without Dependency Injection) and it’s faster than even React.Vue 2 combines the best parts of React, and Angular 1 2.
  • Keep in mind when I said Angular 2 took I week, I meant just the initial learning not mastery.ConclusionFor any new web app, I will almost certainly recommend Vue 2 over React or Angular 2.
  • Members of your team can learn and master it faster, the framework runs faster than the other two, the boiler plate is the least exhausting, and it provides the best capabilities of React and Angular 1 2.

We started a contest at my job to see which framework was the best. At first it was going to be Angular 2 vs React, but then a friend mentioned that people who used Vue wished they had known about it…
Continue reading “Why Vue 2 beats Angular 2 and React – Jon Paul Miles – Medium”

EasyFb : AngularJS Facebook JavaScript SDKAngularJS

EasyFb : #AngularJS Facebook JavaScript SDK 

  • EasyFb : AngularJS Facebook JavaScript SDKSuper easy AngularJS + Facebook JavaScript SDK.
  • Features:Full Facebook JavaScript SDK supportSeamless FB SDK initialization (asynchronously load script and FB.init)All SDK API callbacks are automatically applied with AngularJS contextSupport both callback and $q promiseProvide built-in directive support for Facebook XFBML plugins

Continue reading “EasyFb : AngularJS Facebook JavaScript SDKAngularJS”

Getting started with Angularjs and webapi

  • _service = service;

    // GET: api/Product
    public IEnumerableProduct Get()

    var products = _service.GetAllProducts();
    return products;



    public class ShoppingService: IShoppingService
    private readonly IRepositoryCategory _categoryRepository;
    private readonly IRepositoryProduct _productRepository;
    private readonly IRepositoryImage _imageRepository;
    public categoryRepository,
    IRepositoryProduct productRepository, IRepositoryImage imageRepository)

  • _imageRepository = imageRepository;


    public ListProduct GetAllProducts()
    return _productRepository.GetAll();

    public ListCategory GetAllCategories()
    return _categoryRepository.GetAll();


    public class ProductRepository : IRepositoryProduct
    private readonly DataContext _dbContext;

    public ProductRepository(DataContext dbContext)
    _dbContext = dbContext;
    public ListProduct GetAll()
    return _dbContext.Products.ToList();


    Since we use sqlcompact file to store our data, we need to install sql compact package from nuget, point the sql connection to add name=”DefaultConnection” connectionString=”Data Source =|DataDirectory|Tourism.sdf” /

    Then install sql compact package from nuget, point the sql connection to add name=”DefaultConnection” connectionString=”Data Source =|DataDirectory|Tourism.sdf” /

    Now we just finished writing web api to retrieve data from sql compact file.

  • If the web api is working as expected, I now start creating the single page app, install angularjs App = angular.module(‘App’, [‘ngRoute’]);

    // configure our routes
    App.config(function ($routeProvider) {

    // route for the home page

  • index.html

    body ng-app=”App”
    div class=”navbar navbar-inverse navbar-fixed-top”
    div class=”container”
    div class=”navbar-header”
    button type=”button” class=”navbar-toggle” data-toggle=”collapse” span class=”icon-bar”/span
    span class=”icon-bar”/span
    span class=”icon-bar”/span
    a href=”#/” title=”SPA – TechFunda” class=”navbar-brand”SPA/a
    div class=”navbar-collapse collapse”
    ul class=”nav navbar-nav”
    li class=”active”a href=”#/”Home/a/li
    lia href=”#/PD”Personal Details/a/li
    lia href=”#/about”About us/a/li
    lia href=”#/contact”Contact us/a/li
    div class=”container body-content”

    div id=”divLoading” ng-show=”loading” style=”font-size:50px;”
    div class=”loading”
    Loading …..
    div ng-view/div
    hr /


    The ng-app value needs to be same as the what is defined in the js.

  • Url}}” style=”height:250px;” alt=””

    div class=”caption price-color”
    h4 h4
    div class=”caption description-color”
    div class=”caption description-color”


    Each child view has its own controller, and it is responsible for retrieving and rendering the data in the view.

; Author: honzha99; Updated: 19 Feb 2017; Section: ASP.NET; Chapter: Web Development; Updated: 19 Feb 2017
Continue reading “Getting started with Angularjs and webapi”

Node.js, MongoDb, Bootstrap, Angular 2, Ruby Mega Course Bundle

  • The Web Development profession is expected to grow 27 percent through 2024.
  • With today’s Modern Web Developer bundle, you can master the latest web development tools like:

    Grab LIFETIME access to the Modern Web Developer Bundle for just $39 (DealClub $29.25)

Up your skills with the modern web developer bundle. This bundle includes courses for Node.js, Angular 2, Ruby, Python, MongoDB, Sass, Bootstrap and more
Continue reading “Node.js, MongoDb, Bootstrap, Angular 2, Ruby Mega Course Bundle”

Using multiple dependencies in an Angular.js application

  • Here’s the deal : we have a website which contains lots of pictures, and we want to “visualize” some data.
  • The way to go is using ZingChart (my favorite charting library) and a lazy loader (ing-src-ondemand) with our Angular.js app.The lazy loader will display (load) each picture only when they appear on the screen, via a scroll event.Those two features will add custom directives that can be used with our HTML template to bind the data from the controller (“ZingChart” will use a JSON file, and the lazy loader will take care of the pictures located in a $scope array).
  • To do this, we need to we download the libraries, available online we have them available on local (well, working with local files is, imho, better than depending on the CDN…), we have to load them from the HTML template :script we have to add those dependencies to our app.js file, which can be external, or attached just before the /body tag [‘zingchart-angularjs’, that’s it !
  • But I warn you : do not forget to load the libraries, or your app will not work at all, as the needed dependencies will be missing.

Continue reading “Using multiple dependencies in an Angular.js application”

AngularJS AppModule (the Root module)

AngularJS AppModule (the Root module)

  • Add a module to the array when the application requires its features.
  • The statements at the top of the file and the Angular module’s array are unrelated and have completely different jobs.
  • // import 是在最上面,  imports array 是在NG module 下 , 別搞錯了

    There are many ways to bootstrap an application.

  • In the beginning, you will compile the application dynamically with the Just-in-Time (JIT) compiler and you’ll run it in a browser.
  • The recommended place to bootstrap a JIT-compiled browser application is in a separate file in the folder named

Setup 完之後, app 最少要有一個Appmodule, 也稱 the root module. 可以直…
Continue reading “AngularJS AppModule (the Root module)”