Skip to content
This repository was archived by the owner on Apr 7, 2020. It is now read-only.

weiland/angular-app-init

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular App Init (Angular 2 Style)

Idea: bootstrap angular.js apps by using custom HTML Elements. (as seen in Component Directives in Angular 2)

Example: See it in action

instead of writing <html ng-app="testApp"> one can easily use:

<test-app>
  <my-customer></my-customer>
</test-app>

Note: This is just a small proof of concept

Use it

Prepare

Include modLoader.js after including angular.js and before including your app.

<script src="//code.angularjs.org/1.3.9/angular.js"></script>
<script src="modLoader.js"></script>
<script src="app.js"></script>
"run" your app

If you named your module myApp you can run your app by just adding <my-app></my-app> into your html. my-app is your application scope which means that all your code goes into that.

Todo

  • refactor
  • ng interceptor

About

Init an angularJS app by using it's name as an html tag (AngularJS 2 style)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published