10 examples of 'ng src angular 2' in JavaScript

Every line of 'ng src 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
14function rewriteAngularSrc(src, query) {
15 if (query) {
16 if (query.build) {
17 return query.build + '/' + src;
18 } else if (query.cdn) {
19 return '//ajax.googleapis.com/ajax/libs/angularjs/' + query.cdn + '/' + src;
20 }
21 }
22 return '/build/' + src;
23}
184scope.$watch($sce.parseAsResourceUrl(srcExp), function ngIncludeWatchAction(src) {
185 var thisChangeId = ++changeCounter;
186
187 if (src) {
188 $http.get(src, {cache: $templateCache}).success(function(response) {
189 if (thisChangeId !== changeCounter) return;
190 var newScope = scope.$new();
191
192 cleanupLastIncludeContent();
193
194 currentScope = newScope;
195 currentElement = element.clone();
196 currentElement.html(response);
197 $animate.enter(currentElement, null, anchor);
198
199 $compile(currentElement, false, NG_INCLUDE_PRIORITY - 1)(currentScope);
200
201 if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {
202 $anchorScroll();
203 }
204
205 currentScope.$emit('$includeContentLoaded');
206 scope.$eval(onloadExp);
207 }).error(function() {
208 if (thisChangeId === changeCounter) cleanupLastIncludeContent();
209 });
210 scope.$emit('$includeContentRequested');
211 } else {
212 cleanupLastIncludeContent();
213 }
214});
16private set md2Transclude(templateRef: TemplateRef) {
17 this._md2Transclude = templateRef;
18 if (templateRef) {
19 this.viewRef.createEmbeddedView(templateRef);
20 }
21}
2(function withAngular(angular) {
3 'use strict';
4
5 angular.module('electron.services', [
6 'electron.loading.services'
7 ]);
8}(angular));
9function configAngular($http, common) {
10 // init factory
11 init();
12
13 // service public signature
14 return {};
15
16 // init factory
17 function init() {
18 // set common $http headers
19 $http.defaults.headers.common.Accept = 'application/json;odata=verbose;';
20
21 common.logger.log("service loaded", null, serviceId);
22 }
23}
19ngOnDestroy() {
20 this.lazyLoader.destroy();
21}
53get transclude() {
54 return this._annotation.transclude;
55}
436_copyTsc() {
437 this.generator.template('_typings_ng2.json', 'typings.json');
438 this.generator.template('_tsconfig.json', 'tsconfig.json');
439}
53function compileAngularSource(src, path) {
54 src = importAngularSources(readFileSync(debundle(path)).toString());
55 const {code} = babel(src, {presets: ['es2015']});
56 return code;
57}
44function ngHtml2Js(file, callback) {
45 if (file.isStream()) {
46 return callback(new Error("gulp-ng-html2js: Streaming not supported"));
47 }
48
49 if (file.isBuffer()) {
50 file.contents = new Buffer(generateModuleDeclaration(file, options));
51 var extension = '.js';
52 if(options && options.extension) {
53 extension = options.extension;
54 }
55 file.path = replaceExtension(file.path, extension);
56 }
57
58 return callback(null, file);
59}

Related snippets