angularjs: a simple registry with change event

This example shows how I used the angular service to build a application registry. I also wanted to listen on registry changes.

The service

The usage

angularjs: summary

General

If you uglify angular scripts, remember to use bracket annotation for dependency injection.

Modules

Singleton

Class

Configration: variables, constants

Links

 

Directives

Directive Controller

Attributes

 

Links

angularjs: inject html

Angluar dont let you inject HTML content directly. The solution is to create a filter which makrs the html as trusted.

In the view the syntax looks like the following:

Source

http://stackoverflow.com/questions/19415394/with-ng-bind-html-unsafe-removed-how-do-i-inject-html

first approach to angularjs

Playing around with angularjs, I created an app where you can create and edit items inside a content area.

Github: https://github.com/alexwenzel/angular-tryout

The facts:

  • an app item, which can be modified by position, color and content
  • an area, where items are displayed
  • an area, where items can be created or edited
  • a global item repository

The result is looking like this:

angularjs

 The HTML

The create form

The edit form

The app item

The angular app

The styles (LESS)