GithubHelp home page GithubHelp logo

pgarciacamou / angular-codify Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 282 KB

AngularJS custom directive to display code within the markup. Grabs the code of the element that holds the directive and makes it available in the specified scope. I created this directive because I wanted people to be able to share their Open Source code in their own site without having to go to the trouble of copying, pasting and formatting the code.

License: MIT License

JavaScript 100.00%

angular-codify's People

Contributors

pgarciacamou avatar

Watchers

 avatar  avatar  avatar

angular-codify's Issues

Finish index.html and documentation.

  1. Finish the index.html and put it as the gh-pages branch
  2. make a distribution folder to put the released version
  3. Finish the documentation of the documentation in github

Access variable created must have more options

Example:

<div data-ng-bind="obj._some_prop_"></div>

Right now:

obj === { 
    compiled: .. in compilation phase code .. ,
    code: .. actual code after the linking phases ..
}

What I want:

obj === {
    compiled: ... ,
    prelink: ... ,
    postlink: ... 
    ,cleaned: .. maybe a version without angular code ..
}

Create a filter that allows to filter out stuff.

This filter could be use when displaying the information like:

... ng-bind="code | rm:attr:'some-attribute' | rm:elem:'byId':'elemID' " ...

or

... ng-bind="code | rm:attr:'some-attribute' | rm:elem:'byTag':'elemTag' " ...

or a more specific

... ng-bind="code | rm:'some-attribute':'the-specific-to-remove' ...
// like:
... ng-bind="code | rm:'class':'btn btn-default' ...

maybe something further and harder to do like:

... ng-bind="code | rm:attr:'some-attribute':in:elem:'byTag':'elemTag' " ...

See how far we can go.

Not displaying the code created by angular

I found this by trying to use the ng-repeat directive inside of the code I want to display. What is happening is that AngularJS is commenting out the code of the directive instead of adding it to the actual code string gotten by the cd-code directive.

Here is an example!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.