Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

ngScripts #72

Closed
5 tasks
PatrickJS opened this issue Aug 9, 2015 · 6 comments
Closed
5 tasks

ngScripts #72

PatrickJS opened this issue Aug 9, 2015 · 6 comments

Comments

@PatrickJS
Copy link
Contributor

this replaces build_scripts.ts

prior art:
riot/compiler

create directives that emulates <module import="angular2/angular2"><module> and also allow inline scripts such as

<script type="text/typescript">
  class App {}
</script>

and also inject dep angular with type="angular"

<module type="angular">
  @Component({ selector: 'app' })
  @View({ template: '<div>hello world</div>' })
  class App {}
</module>

we can also inject systemjs and es6 module loader.

We should also allow for app state management from build_scripts where we are able to control how the application is ran on the client. Or leave that feature for another module such as ngAppState

<ng-component> element

<ng-component name="app">
  <style>

  </style>

  <template view="app">

  </template>

  <module>
    import {Component, View} from '@angular/angular';
    @Component({

    })
    @View({

    })
    class App {
      constructor() {

      }
    }
  </module>
<ng-component>
  • allow Typescript/Babel(ES6/ES7)/CoffeeScript script tags
  • allow module elements
  • allow angular type module/script
  • allow element
  • use Angular 2's compiler
@jeffwhelpley
Copy link
Contributor

See how this can be implemented using AST transformations.

@wesleycho
Copy link
Contributor

What is meant by supporting TypeScript/Babel/CoffeeScript script tags?

Also, what is build_scripts.ts? Is that the current contents of ng_scripts.ts?

@jeffwhelpley
Copy link
Contributor

I am wondering how relevant we think this is. @gdi2290 do we really need this? I suggest that if no one is asking for this yet, let's close and wait until it actually becomes an issue. I don't really see a need.

@PatrickJS PatrickJS removed this from the Backlog milestone Feb 7, 2016
@PatrickJS
Copy link
Contributor Author

this is needed to combat "javascript fatigue" and/or to provide a better developer experience when progressively scaling the application complexity from a toy/example app -> small app it's a bit out of scope for now and we can circle back later. Closing for now

@PatrickJS
Copy link
Contributor Author

ngScripts will be done and tracked by #309 as the Script <script> and Module <module> directive

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants