10 examples of 'ng change angular 2' in JavaScript

Every line of 'ng change angular 2' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
168function Ng1Change(previousValue, currentValue) {
169 this.previousValue = previousValue;
170 this.currentValue = currentValue;
171}
19ngOnDestroy() {
20 this.lazyLoader.destroy();
21}
11function ngNicescroll($rootScope,$parse) {
12 // Usage:
13 //
14 // Creates:
15 //
16 var directive = {
17 link: link
18 };
19 return directive;
20
21 //Gandu
22
23 function link(scope, element, attrs, controller) {
24
25 var niceOption = scope.$eval(attrs.niceOption)
26
27 var niceScroll = $(element).niceScroll(niceOption);
28 var nice = $(element).getNiceScroll();
29
30 if (attrs.niceScrollObject) $parse(attrs.niceScrollObject).assign(scope, nice);
31
32 // on scroll end
33 niceScroll.onscrollend = function (data) {
34 if (this.newscrolly >= this.page.maxh) {
35 if (attrs.niceScrollEnd) scope.$evalAsync(attrs.niceScrollEnd);
36
37 }
38 if (data.end.y <= 0) {
39 // at top
40 if (attrs.niceScrollTopEnd) scope.$evalAsync(attrs.niceScrollTopEnd);
41 }
42 };
43
44
45 scope.$on('$destroy', function () {
46 if (angular.isDefined(niceScroll.version)) {
47 niceScroll.remove();
48 }
49 })
50
51
52 }
53}
197ngOnChanges(changes: SimpleChanges) {
198 if (changes['setLabelText'] ||
199 changes['setOnText'] ||
200 changes['setHandleWidth'] ||
201 changes['setLabelWidth'] ||
202 changes['setOffText'] ||
203 changes['setSize']) {
204 this.calculateWith(true);
205 }
206}
16private set md2Transclude(templateRef: TemplateRef) {
17 this._md2Transclude = templateRef;
18 if (templateRef) {
19 this.viewRef.createEmbeddedView(templateRef);
20 }
21}
207afterViewLifecycleCallbacksInternal() {
208 var dirs = this._directiveRecords;
209 for (var i = dirs.length - 1; i >= 0; --i) {
210 var dir = dirs[i];
211 if (dir.callAfterViewInit && this.state == ChangeDetectorState.NeverChecked) {
212 this._getDirectiveFor(dir.directiveIndex).ngAfterViewInit();
213 }
214 if (dir.callAfterViewChecked) {
215 this._getDirectiveFor(dir.directiveIndex).ngAfterViewChecked();
216 }
217 }
218}
400scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {
401 attr.$set(ngAttr, value);
402});
2(function withAngular(angular) {
3 'use strict';
4
5 angular.module('electron.services', [
6 'electron.loading.services'
7 ]);
8}(angular));
158function onAngularTypeChanged() {
159 var angularType = document.getElementById('angularType').value;
160
161 var indexDot = angularType.indexOf('.');
162 if (indexDot != -1) {
163 document.getElementById('angularField').value = angularType.substring(indexDot + 1, angularType.length);
164 }
165 }
53get transclude() {
54 return this._annotation.transclude;
55}

Related snippets