Showing posts with label Angularjs. Show all posts
Showing posts with label Angularjs. Show all posts

Thursday, February 11, 2016

Service vs factory, constant vs value

Factory return an object with methods
Service has to be initiated with new

Constant available during angularjs configuration phase

Value available during run time phase

ng-cloak ng-bind

Tuesday, February 9, 2016

IIFE immediately invoked function experssion

Self executing IIFE

(function(){
    "use strict";
    var app = angular.module("musicApp", []);
    app.controller('ArtistController', [artistController]);
    function artistController() {
        var vm = this;
        vm.name = 'Foo';
    };
}());


<!DOCTYPE html>
<html>
<head>
    <title>test</title>
<meta charset="utf-8" />
    <script src="scripts/angular.js"></script>
    <script src="scripts/app.js"></script>
</head>
<body>
    <div ng-app="musicApp">
    <div ng-controller="ArtistController as vm">
        {{vm.name}}
   
    </div>
</div>
</body>
</html>

Thursday, October 1, 2015

Friday, May 22, 2015

Share data between controller

stackoverflow.com/questions/21919962/angular-share-data-between-controllers

http://stackoverflow.com/questions/21919962/angular-share-data-between-controllers

Thursday, May 21, 2015

How to access data in service scope


1st get from server and put data in a service, since the service have data, have a controller use the service then, no need to go server again. just get the data from the service.

Monday, May 18, 2015

angular js step by step

http://www.toptal.com/angular-js/a-step-by-step-guide-to-your-first-angularjs-app

Sunday, May 17, 2015

Angular JS step by step

http://blog.pluralsight.com/angularjs-step-by-step-controllers

Angularjs service created by factory

Directive
Form can be embedded

ng-init load data when page loads



<div id="bodyContainer" ng-app="QuizApp">
    <section id="content">
        <div class="container">
            <div class="row">
                <div class="flip-container text-center col-md-12" ng-controller="QuizCtrl" ng-init="nextQuestion()">

Wednesday, April 29, 2015

Angular MVC sample

http://www.codeproject.com/Articles/791740/Using-AngularJs-ASP-NET-MVC-Web-API-and-EntityFram

angualr js mvc validation

http://stackoverflow.com/questions/15046817/asp-net-mvc-validation-form-with-angularjs

http://www.ng-newsletter.com/posts/validations.html

Monday, April 27, 2015

Thursday, April 23, 2015

Tuesday, June 17, 2014

Angular js tutorial

AngularJS Fundamentals In 60-ish Minutes: http://youtu.be/i9MHigUZKEM