@reference_1_tutorials.jenkov.com
Java Annotations
@reference_2_tutorials.jenkov.com
Java Reflection Tutorial
@reference_3_tutorials.jenkov.com
Java Lambda Expressions
Thursday, June 8, 2017
Getting Started with Apache TomEE
@reference_0_youtube
Getting Started with Apache TomEE
@reference_1_stackoverflow
Dynamic Web Project option missing in Eclipse
@reference_2_youtube
Eclipse Dynamic Web Project missing / Java EE Tools not available + Installing External Tools
@reference_3_help.eclipse.org
Dynamic Web projects and applications
@reference_4_stackoverflow
The import javax.servlet can't be resolved
@reference_5_stackoverflow
java EJB: The import javax.ejb cannot be resolved
@reference_6_stackoverflow
Several ports (8005, 8080, 8009) required by Tomcat Server at localhost are already in use
@reference_7_openejb.apache.org
JavaEE Examples
Monday, June 5, 2017
How to connect one model variable to mutiple html elements using angularjs data binding?
@reference_1_stackoverflow
How to connect one model variable to mutiple html elements using angularjs data binding?
@reference_1_toptal
Top 18 Most Common Mistakes that AngularJS Developers Make
But, when setting a new value, what happens depends on what kind of model (variable) we want to change. If the model is a primitive, the child scope will just create a new model. But if the change is to a property of a model object, the lookup on parent scopes will find the referenced object and change its actual property. A new model would not be set on the current scope, so no masking would occur:
Clicking the button labelled “Change object” will change the bar property from the parent scope. Since there is no variable on the inner scope, no shadowing will happen, and the visible value for bar will be 3 in both scopes.
Another way to do this is to leverage the fact that the parent scopes and the root Scope are referenced from every scope. The
@reference_3_itfashion4u
AnularJS 'limitTo' filter inside/outside div element with 'ng-if' attribute
How to connect one model variable to mutiple html elements using angularjs data binding?
@reference_1_toptal
Top 18 Most Common Mistakes that AngularJS Developers Make
Common Mistake #2: Not Having a Dot In There
You probably have read that if you were not having a dot in your ng-model, you were doing it wrong. When it regards inheritance, that statement is often true. Scopes have a prototypal model of inheritance, typical to JavaScript, and nested scopes are common to AngularJS. Many directives create child scopes such asngRepeat, ngIf, and ngController. When resolving a model, the lookup starts on the current scope and goes through every parent scope, all the way to $rootScope.But, when setting a new value, what happens depends on what kind of model (variable) we want to change. If the model is a primitive, the child scope will just create a new model. But if the change is to a property of a model object, the lookup on parent scopes will find the referenced object and change its actual property. A new model would not be set on the current scope, so no masking would occur:
function MainController($scope) {
$scope.foo = 1;
$scope.bar = {innerProperty: 2};
}
angular.module(‘myApp’, [])
.controller('MainController', MainController);
<div ng-controller=“MainController">
<p>OUTER SCOPE:</p>
<p>{{ foo }}</p>
<p>{{ bar.innerProperty }}</p>
<div ng-if=“foo”> <!— ng-if creates a new scope —>
<p>INNER SCOPE</p>
<p>{{ foo }}</p>
<p>{{ bar.innerProperty }}</p>
<button ng-click="foo = 2”>Set primitive</button>
<button ng-click=“bar.innerProperty = 3”>Mutate object</button>
</div>
</div>
Clicking the button labelled “Set primitive” will set foo in the inner scope to 2, but will not change foo in the outer scope.Clicking the button labelled “Change object” will change the bar property from the parent scope. Since there is no variable on the inner scope, no shadowing will happen, and the visible value for bar will be 3 in both scopes.
Another way to do this is to leverage the fact that the parent scopes and the root Scope are referenced from every scope. The
$parent and $root objects can be used to access the parent scope and $rootScope,
respectively, directly from the view. It may be a powerful way, but I
am not a fan of it due to the problem with targeting a particular scope
up the stream. There is another way to set and access properties
specific to a scope - using the controllerAs syntax.@reference_3_itfashion4u
AnularJS 'limitTo' filter inside/outside div element with 'ng-if' attribute
AnularJS 'limitTo' filter inside/outside div element with 'ng-if' attribute
The 'ng-repeat' limitTo filter won't work unless you remove the ng-if='true' attribute or put the <ul> list inside div element.
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body ng-app="myApp" ng-controller="namesCtrl">
<div ng-if='true'>
<p>Type a letter in the input field:</p>
<p><input type="number" ng-model="test"></p>
</div>
<ul>
<li ng-repeat="x in names | limitTo:test">
{{ x }}
</li>
</ul>
<script>
angular.module('myApp', []).controller('namesCtrl', function($scope) {
$scope.names = [
'Jani',
'Carl',
'Margareth',
'Hege',
'Joe',
'Gustav',
'Birgit',
'Mary',
'Kai'
];
});
</script>
<p>The list will only consists of names matching the filter.</p>
</body>
</html>
@reference_1_w3schools
@reference_2_youtube
@reference_3_itfashion4u
How to connect one model variable to mutiple html elements using angularjs data binding?
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body ng-app="myApp" ng-controller="namesCtrl">
<div ng-if='true'>
<p>Type a letter in the input field:</p>
<p><input type="number" ng-model="test"></p>
</div>
<ul>
<li ng-repeat="x in names | limitTo:test">
{{ x }}
</li>
</ul>
<script>
angular.module('myApp', []).controller('namesCtrl', function($scope) {
$scope.names = [
'Jani',
'Carl',
'Margareth',
'Hege',
'Joe',
'Gustav',
'Birgit',
'Mary',
'Kai'
];
});
</script>
<p>The list will only consists of names matching the filter.</p>
</body>
</html>
@reference_1_w3schools
@reference_2_youtube
@reference_3_itfashion4u
How to connect one model variable to mutiple html elements using angularjs data binding?
Sunday, June 4, 2017
< input type=“number” > not working in IE10
IE doesn't have support for input type="number" but you can use a polyfill to make it work.
@reference_1_stackoverflow
<input type=“number”> not working in IE10
Here is the solution : http://html5please.com/#number
@reference_1_stackoverflow
<input type=“number”> not working in IE10
Showing Spinner GIF during $http request in angular
@reference_1_stackoverflow
Showing Spinner GIF during $http request in angular
@reference_2_stackoverflow
Delay loading data in Angular JS
Showing Spinner GIF during $http request in angular
@reference_2_stackoverflow
Delay loading data in Angular JS
Use this 'ng-cloak' to avoid the undesirable flicker effect caused by the html template display
What you are looking for is
You have to add it like this:
It is also advisable to put the snippet below into your CSS file, according to docs.
AngularJS strategy to prevent flash-of-unstyled-content for a class
@reference_2_angularjs.org
ngCloak - directive in module ng
* @reference_3_stackoverflow AngularJS: How to prevent “code flash” in page while loading
ng-cloak.You have to add it like this:
<body class="{{ bodyClass }}" ng-cloak>
Edit:It is also advisable to put the snippet below into your CSS file, according to docs.
"For the best result, the angular.js script must be loaded in the head section of the html document; alternatively, the css rule above must be included in the external stylesheet of the application."
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
@reference_1_stackoverflowAngularJS strategy to prevent flash-of-unstyled-content for a class
@reference_2_angularjs.org
ngCloak - directive in module ng
Subscribe to:
Posts (Atom)