angular / angular-hint

run-time hinting for AngularJS applications
362 stars 45 forks source link

Document enabling ng-hint when manually bootstrapping the project #54

Closed DrMabuse23 closed 9 years ago

DrMabuse23 commented 9 years ago

Hi , Iam Bootstraping my App . Someone give me an example how to Bootstrap angular-hint ?

mgol commented 9 years ago

It's all in the readme: https://github.com/angular/angular-hint#usage. Anyway, this is a bug tracker, not a support forum, such questions don't belong here.

DrMabuse23 commented 9 years ago

i Think You dont understand my question my example and this is not in your usage!!!

angular.bootstrap(document.getElementsByTagName('html'), ['app']);

and now my question again How to bootstrap angular-hint

Besides others, I find the answer rather abrupt

mgol commented 9 years ago

For ng-hint to work you just need to add the ng-hint attribute anywhere in the document, even if you're bootstrapping manually. Can you try that? We can migrate this bug report to be one about inadequate documentation around the bootstrapping process.

In the future, please try to be more specific. "give me an example" sounds like you are expecting us to try to debug your problem and - as I said - this is not a support forum. If you wrote sth along "README doesn't mention the case when one is manually bootstrapping the app" it would be clear to us you're describing a documentation issue and not just asking for help.

DrMabuse23 commented 9 years ago

accept :+1:

DrMabuse23 commented 9 years ago

Hey it looks like ng-hint will be bootstrapped with a simple

angular.element('html').attr('ng-hint')

but i get

Error: Error in parsing: "lib/hint.js", Cannot read property '0' of undefined

wil check later

mgol commented 9 years ago

No, I meant that you literally have to put the ng-hint attribute into your HTML, not from JavaScript.

thetutlage commented 9 years ago

@DrMabuse23 You need to put it inside the html and also close the thread

DrMabuse23 commented 9 years ago

ok