This is an attempt to add Twig templating support to Angular 2 (WIP)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let regex = `import | |
| (?: | |
| ["'\s]* | |
| ([\w*{}\n, ]+) | |
| from\s* | |
| )? | |
| ["'\s]* | |
| ([@\w/_-]+) | |
| ["'\s]* | |
| ;? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare module NodeJS { | |
| interface Global { | |
| window: any | Window; | |
| } | |
| } | |
| global.window = {}; | |
| /** | |
| * Warn the developer about direct access to Window props |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export let MyModule = angular.module('MyModule', []); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { MD_DIRECTIVES } from './md.providers.ts'; | |
| @Component({ | |
| //... | |
| directives: [MD_DIRECTIVES] | |
| }) | |
| //... |
https://docs.google.com/document/u/1/d/1RIezQqE4aEhBRmArIAS1mRIZtWFf6JxN_7B4meyWK0Y/pub
import { bootstrap } from '@angular/platform-browser-dynamic';
import { provide } from '@angular/core';
import {disableDeprecatedForms, provideForms} from '@angular/forms';
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <button class="btn btn-primary">Ajouter un film</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* ng-infinite-scroll - v1.1.2 - 2014-05-21 */ | |
| /* original code: https://github.com/sroze/ngInfiniteScroll/issues/69#issuecomment-51181292 */ | |
| var mod; | |
| mod = angular.module('infinite-scroll', []); | |
| mod.value('THROTTLE_MILLISECONDS', null); | |
| mod.value('THROTTLE_DISTANCE', 20); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit, NgZone } from '@angular/core'; | |
| import { BatteryLevelService } from '../battery-level.service'; | |
| import { BluetoothCore } from '@manekinekko/angular-web-bluetooth'; | |
| @Component({ | |
| selector: 'ble-battery-level', | |
| //... | |
| providers: [ BatteryLevelService, BluetoothCore ] | |
| }) | |
| export class BatteryLevelComponent implements OnInit { //... |