stylemark icon indicating copy to clipboard operation
stylemark copied to clipboard

Angular support? Which versions? How?

Open kroeder opened this issue 7 years ago • 7 comments

Hey,

in the description it sais stylemark supports angular but there's no demo code for any Framework

I'd like to generate a living style guide for my angular components - is this possible or is this a "css/less/scss" style guide only?

Altough there's a documentation I think it's lacking a couple of things like code examples for react / angular / ..., what's possible, what's not possible, which angular version is supported (angularJS? angular 2, 4, 5? - does it even matter?)

Thanks in advance!

kroeder avatar Nov 10 '17 12:11 kroeder

Just registering my interest for this too, thanks.

gethinoakes avatar Nov 28 '17 20:11 gethinoakes

Stylemark is relatively framework-agnostic and should work with Angular 1.x and 2.x. Sorry for the delay in documentation, we'll be adding examples and better docs for Angular soon!

mpetrovich avatar Dec 28 '17 21:12 mpetrovich

Any news on the updated docs? I'm trying to get it working with an Angular project but didn't have any luck with it yet.

ReindDooyeweerd avatar Feb 12 '18 14:02 ReindDooyeweerd

Same here, would love to have some documentation for other frameworks like VueJS

upstroke avatar Feb 22 '18 08:02 upstroke

@Vout Sorry it's been so long to get the framework-specific steps documented. TL;DR, for AngularJS 1.x use .angularjs for JS blocks that you want to assign to the HTML scope. These will be compiled via $scope.$eval()

```example.html
<button>{{ label }}</button>
```
```example.angularjs
label = "Click me"
```

mpetrovich avatar Mar 08 '18 15:03 mpetrovich

@mpetrovich thanks, how about for angular2+?

geocine avatar Apr 02 '18 15:04 geocine

@mpetrovich is this going to work with Angular 6 that just came out?

daiky00 avatar May 15 '18 23:05 daiky00